From nobody Mon Sep 30 04:45:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XH7mB4TCMz5Xjv0; Mon, 30 Sep 2024 04:45:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7m94bjNz4Dxr; Mon, 30 Sep 2024 04:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AuKNa0AGM5MlWxL1xCA2Gq4+WbhkNYbcFhyTmAz7HNg=; b=YBT0Nrwj5LZpca+6mhP8FhpP5jNcbCd767U14k3y1IMTZLcOika8gi6NELku2+3SGClHEn hRUInJVLdLL6b0ydbW682i8uE+4MshCxUHzArYQFkBVHHVczJawd0TVsYFafLSVWF/U+DN esa7Wx8yMhlkZNrtduncBtD3crOXOCHAcggpEBkwff9C8akz6i9GXtG56J0N/mRIkzxIJ2 W+5vaj9M3NcXFlsng3+xjPWgSYhScSP5SmOpjLEa38zvg+nn8SgVZTy1FSLKpv28MPfiGU 16IBr2k1v9rKXRSu+TE9Y4WOjre/hVuvs1QImEQfu79lAjGoP+1lx42rc8+VVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AuKNa0AGM5MlWxL1xCA2Gq4+WbhkNYbcFhyTmAz7HNg=; b=m7hwHyTQ60EKBj2EylDXwFFzleWGQuBacLHNF49yXBeiB/jm/53XTN8DeQ2HIdwpI89eis u1d14Vldc+qnvPEbqHHnJ2rJepvaeFECOdzLyed3/uyYVmTbpDfZrIrH4yG9j8ZuDxItrh M26N1LRke5PYolvVCgP/3YUbjlmE68UOsPLre0eI/e5cZoMKVTyoHiBDf7muz8biwNFIsQ GlUftjjgPsdyiGa5nIg7IC1xDdnNr2h4S20lQRjbdUiP401sDp+4GKAjT7Qb0s0vad4SqM WrBOE6bhhrZ0ozDX3HLrP9WKSAwSRMhW2NPZbDwxTchXB+UT+NZRAL5dD1BR4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671513; a=rsa-sha256; cv=none; b=JMjBsMs7C+9ZrmA+xyYs51VPm4mpeZHKdbCEiUeqBtNoLFwQ+7omR7saiKetoSq4SnRi0U aOjusUuw0efgnlvrIFFNfEzKr8NLtCS0JUO4Bv79yJZzm6NPnnZHQCoUpk/Sc7oABeWI/v A9COFbM4FJEs/VnoyebQ87cr7aGLsZskvV5kVkgXZhwSqjHstcPlJRs0H9K9cXMzITZNVt Oa0xZAqNTVU8f6ec0LnVMfcgUx5Eij9ozTWmu3dCBashAPy6nLy9lpiOh+KG1Eh9mCHiqI EkLeKiNWUEXTTSm2dJqPYq3sNx6hK6I6b/p+x87NPtbF/rzfeVBabDBUtCLKfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XH7m942JBzfFq; Mon, 30 Sep 2024 04:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48U4jDqN086414; Mon, 30 Sep 2024 04:45:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jDgI086411; Mon, 30 Sep 2024 04:45:13 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:13 GMT Message-Id: <202409300445.48U4jDgI086411@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: ce708880847c - stable/14 - netsmb: Stop checking for failures from malloc(M_WAITOK) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ce708880847cb8d87ac0d7499fdb6f08cc33a7f8 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ce708880847cb8d87ac0d7499fdb6f08cc33a7f8 commit ce708880847cb8d87ac0d7499fdb6f08cc33a7f8 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:20 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:16 +0000 netsmb: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 6e50988cf822f87a524b8da2fdc35b234078cc2f) --- sys/netsmb/smb_rq.c | 4 ---- sys/netsmb/smb_subr.c | 2 -- 2 files changed, 6 deletions(-) diff --git a/sys/netsmb/smb_rq.c b/sys/netsmb/smb_rq.c index 71f6e221ace9..0170514f52ce 100644 --- a/sys/netsmb/smb_rq.c +++ b/sys/netsmb/smb_rq.c @@ -65,8 +65,6 @@ smb_rq_alloc(struct smb_connobj *layer, u_char cmd, struct smb_cred *scred, int error; rqp = malloc(sizeof(*rqp), M_SMBRQ, M_WAITOK); - if (rqp == NULL) - return ENOMEM; error = smb_rq_init(rqp, layer, cmd, scred); rqp->sr_flags |= SMBR_ALLOCED; if (error) { @@ -377,8 +375,6 @@ smb_t2_alloc(struct smb_connobj *layer, u_short setup, struct smb_cred *scred, int error; t2p = malloc(sizeof(*t2p), M_SMBRQ, M_WAITOK); - if (t2p == NULL) - return ENOMEM; error = smb_t2_init(t2p, layer, setup, scred); t2p->t2_flags |= SMBT2_ALLOCED; if (error) { diff --git a/sys/netsmb/smb_subr.c b/sys/netsmb/smb_subr.c index 8094f9593957..73961f7a8c81 100644 --- a/sys/netsmb/smb_subr.c +++ b/sys/netsmb/smb_subr.c @@ -150,8 +150,6 @@ smb_memdup(const void *umem, int len) if (len > 8 * 1024) return NULL; p = malloc(len, M_SMBSTR, M_WAITOK); - if (p == NULL) - return NULL; bcopy(umem, p, len); return p; }