From nobody Tue Sep 03 10:26:52 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 4Wyhcr75Zsz5MkT7; Tue, 03 Sep 2024 10:26:52 +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 4Wyhcr41Ssz4rqR; Tue, 3 Sep 2024 10:26:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725359212; 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=h70JcTIDxO1yrZdSbpc7bhFs7iDj0ceT0X7ow9mKUUY=; b=jTmMZ3Qfm+C80fDJeevVDGdGiTRSsywOERuNv0BPbqFDMoJC9T7XBFuJv0OZiBlSuHi2UB R60RqKe2Z6wjuUosBqDhso3PMuaLqoDvk7u7B41cVeRhc0zD/HsMFbhwLRK9gL6SpFjg5B NCHmhJ681fTDmm1jhkqp1rWtD1zvkNLeFwSsOMRzOObD8aFjJGauLrj57QV8ZThIGoWPAN LXBGj58/+zhqY5GUW77GAxkBnbBI8Z5KaBo03hJkx5HAHSyrRxYO7AgOpaRjADK/ORHqmc imijbENjHEH2ryIXIupKdkXH2pOIzfNZ4F+mV1ehDPrk0LhfBBevWeELj0pjEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725359212; a=rsa-sha256; cv=none; b=D5PqNebOyzmcMrdhJzjRUYKBE21ipJIxycucaDVuQCxRW8UDTCO2uvo74GDfKCcK7IYduP 0sE68HgeSp1pB2RyfZCLoI4OA7DyAuaPbrs9q1RzdfMDcv4POsB1zL21EpvuCj1+a8Xon8 M9PCKM3JrHKJDr1bNYMjqQNy12aCqhTtAslERrioaGJ1t9125wZuAxilb9Wj/NgcAaX1HL CQ0vCrSublbebqSwKaUPx/JxM1w5fHPGRNdkm/S14fsIOmvC6ArjhFuplAlcTjxZtaZIfL C+/JpdsPDy1QsilU4ZmS/ilUPZc47gJZJcs4a3BzaCoAFkYTGjoBjYCfam9OGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725359212; 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=h70JcTIDxO1yrZdSbpc7bhFs7iDj0ceT0X7ow9mKUUY=; b=c0LJINP/6+HrnR9QdXnyXl9xpVHp9L/kLShrnPav60pvBYVnW85kHbTCtMicn5JoCwBj7P 6DN5lHM4P1pSVygT9Km0EYXRhU2I6s1iV+vvn1whvWW46vLZ6ohTA+kjp29EX7Q0zTfL8t FWiOK4AmLV7RCtrKZ5SbR/EJvOL0ErAo+SEZajo+zHQOF0TdIPcxucstsLZIG6tcXOdjV7 sPK6s8OQEXKEqrnYL5+xQTqEzhZXK/QN5TLMdAvs0ekd2jkJgEsiwc1xVAFZTLFBb/t3Ef h6uB5J+zjFaXRJ3esF91W7Rgxblt2FWjKWZcXqBAWuTNZ0XKSkImaf33RpHKPw== 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 4Wyhcr3d17zcxm; Tue, 3 Sep 2024 10:26:52 +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 483AQqcU009109; Tue, 3 Sep 2024 10:26:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 483AQqWY009106; Tue, 3 Sep 2024 10:26:52 GMT (envelope-from git) Date: Tue, 3 Sep 2024 10:26:52 GMT Message-Id: <202409031026.483AQqWY009106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 6e50988cf822 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 6e50988cf822f87a524b8da2fdc35b234078cc2f Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6e50988cf822f87a524b8da2fdc35b234078cc2f commit 6e50988cf822f87a524b8da2fdc35b234078cc2f Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:20 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-03 10:25:20 +0000 netsmb: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 --- 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 a33598489aa1..b2642f1aaa6d 100644 --- a/sys/netsmb/smb_rq.c +++ b/sys/netsmb/smb_rq.c @@ -64,8 +64,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) { @@ -376,8 +374,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 fbb951a37cef..68469cf5cc35 100644 --- a/sys/netsmb/smb_subr.c +++ b/sys/netsmb/smb_subr.c @@ -149,8 +149,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; }