From nobody Mon Sep 30 05:08:05 2024 X-Original-To: dev-commits-src-branches@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 4XH8GZ1L8vz5Xlnn; Mon, 30 Sep 2024 05:08:06 +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 4XH8GY65Knz4WWB; Mon, 30 Sep 2024 05:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672885; 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=dU1CveKXENmiSP033J+bMdUxqmhDF2qu+qTlgJefJqQ=; b=g67tGkA61Hz6XCGKcH9Z1/a2JmfOTx92/pe9N0FHt+6hlAq8YaTx/hi/xD222qXFv/LFj4 QA+f6gTvugg/jt66hZ5daJzNdbaE2T6eQkFtb+iEXgqbdgcbHhE1+7ssLbsfxsLNQWt6o+ 2BUxC7iNCLix1SR0ikf4QrfK8k94ksF29v9JWLCl0Ky07MtI0ZEYIiBmfW+EFI2eTAyoph 2Q7y38Xq09pof/UfUy9pWsGPbBnfNcgwAHuawMGQM4S1AmAQF6b8wNBsYzS8/G2qlo9pzx n7u6mLJ6BuORvtNZok5j3mhiO4oiGZnJAKYIxIOgbEeIgiZM2r64n6ejGq7KMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727672885; 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=dU1CveKXENmiSP033J+bMdUxqmhDF2qu+qTlgJefJqQ=; b=O7FaUm6KS3CGZPCDskprOm5gyXOiWJKfp0OV3dTFJD5OJMa8rPGNRqzxh5OS+BXtwwJlcl 0k2xaefWuZcZGoTf9X0zc1He5RUkkDNqhFD3yIHqJRHOU5+H3+wQyIfJVFf3IgIA7gPxYK X4nw/b0ltrurdTqgKkDsUS644Al6+Y03LWvVWl3AZkH4zph/qQq6rZ8ykUKgiQOBxZODRG rlBTCpNqM9RBFM4ALujk9nfIAKbsfPBY4eMcRzQozAVSfd+tOkeSZCo/4NMVSOh0rNFVxL 5YMPoKnBkFPyWUXzhFPRQR6WbfP6hzkryz8XgOvF716Ewv1d70qS8FT+ZqVa+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727672885; a=rsa-sha256; cv=none; b=h+xKAVw5QCoBb695utPq9YaWz3/A/ZapHHda6X+gT/f3ZotbQ2WBlGnYahXQ9ZLGr5iAjl pAWBDXcXi686pBdx+HO2WbjNBw/5l4QiUP5TtSBWkUJEHCjMF3koU+mfJ+iC+rDMBpNaTz XfR8m0y9hkWn3fYHqsQkaPDgFFUc+Wpj+Ed7Sv/bvuxL8Hh1do7+sB8tmOj7ZSsfcBUH/H Rdx7tqJXHyEtvEEOdaSU+eHGLOOH/oCG9ntKRs8Tt8//I6CQzqNgP/fH5tC/6Mdv3l8p7i P46saqdVSkY5iUaVKxjN7gqvkXGwh8pXVZq50QtAEqFHM8M9bEGW6ZrlaRQyuA== 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 4XH8GY3Q9PzftY; Mon, 30 Sep 2024 05:08:05 +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 48U585dv024255; Mon, 30 Sep 2024 05:08:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U585fv024252; Mon, 30 Sep 2024 05:08:05 GMT (envelope-from git) Date: Mon, 30 Sep 2024 05:08:05 GMT Message-Id: <202409300508.48U585fv024252@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: be02b9a1142e - stable/13 - netsmb: Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: be02b9a1142e39dd537056c4917a86a97d901eb3 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=be02b9a1142e39dd537056c4917a86a97d901eb3 commit be02b9a1142e39dd537056c4917a86a97d901eb3 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:20 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 05:05:30 +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) (cherry picked from commit ce708880847cb8d87ac0d7499fdb6f08cc33a7f8) --- 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; }