From nobody Mon Sep 30 04:45:09 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 4XH7m642f7z5Xjwt; Mon, 30 Sep 2024 04:45:10 +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 4XH7m619PJz4Df5; Mon, 30 Sep 2024 04:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671510; 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=boZvgMY/J+hXFIbp4H5pdYbqjri9Ip4anhZn/Bkdxz8=; b=LyBhuFgzx2HssoTLk9xrsX4fQg3GlgG+E/RqQcLdC4xjAJNgvN6VhvCynfHGSdSK6WIOG6 vax1JelrhXna03LfCi3jssMk0KOMfoXdeR4sdEGhIhFVpRDv/bEPwfsUJqUvF7/cv0PIA4 EvtrVXMxaWkqm167Ri62TCOSA93aNbio0Xr34fVM9HxPVtb+c5N3Cad5pOacY5/UqmJk/k EVnkt2uximi1z1KAfKQsf/Moad8w8sE1U9VqhRYTsCCY2uNpCZ7woZBxIKfslo2l4X2GYv YiMansxefV70MdnLvQVS8NzYpQiu5IDKPb94UKcKxtjsadygnsvb6o1sbSO3hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671510; 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=boZvgMY/J+hXFIbp4H5pdYbqjri9Ip4anhZn/Bkdxz8=; b=hAgiaPTelN5t3OGzHR4MJ6cw7B1AQyEfINiI9oYk0pSYRwjQ7rvWBMYLCyWN0GNSbAMbL+ 22O8dlTF64n41R+PkmXVsFXegiwwUlEQJCIK+h1Xj1bKC5Vl7V8Ih9BbABPQOPxzx6GPLu NrV15JU5C3hyMWy3bMYIy/jt9LmoetttK1j2BnmxLUACHddOZ1Na62rX4MSTgpND4Klsc4 0EiAsS67NBMh3epAqLlTTY8YhGRZwBvN2xlFtvBuPhPuPbax4WmP8xMg3WIWTT5+Edypbm pPspb0yWN8OH3+wmyZRDiTZ6tt80coN1VVef4UKsg/P8TUTxvQfN8oIIxdQsZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671510; a=rsa-sha256; cv=none; b=OagG4DhYMn/0WSgrMpOLPVITyQZN5PHCkZkg049IonjJLLOgYZX0P86Z36wNXmWXhN1oqw kNajYzsUsjGdmUlvbJX1W6dy/o29xRXcxGBvoYZWHILexk/z3ULBEj+v7b0suBbI03q+iF kuOSjw9RqlVlRDpBDFGrfSuVmYnQoywflMQJeJPtshk5T7ZxDdoPDERjCS/YgWKWNsWznZ cU8nUXYDXvvlzcmAVtYE0AoDoJNay6UB4uiF2FqHQg9LTRDFaG7CTEpsWZNxFJ40AInySw RXc85VsKYQ9WyZrkatJ0WKabbpwUpm8IbwC41p5oAsJxhEMl3cNhVvHN1VnejA== 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 4XH7m60fDRzf29; Mon, 30 Sep 2024 04:45:10 +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 48U4j9Mo086260; Mon, 30 Sep 2024 04:45:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4j9kU086257; Mon, 30 Sep 2024 04:45:09 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:09 GMT Message-Id: <202409300445.48U4j9kU086257@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: 891fdd020a68 - stable/14 - altq: 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: 891fdd020a6826eb98d30284f78000e666f9a263 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=891fdd020a6826eb98d30284f78000e666f9a263 commit 891fdd020a6826eb98d30284f78000e666f9a263 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:19 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:15 +0000 altq: Stop checking for failures from malloc(M_WAITOK) While here, prefer malloc(M_ZERO) over bzero(). MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 2a119886630bb5fe8283e20db5acb7c0cdba31c3) --- sys/net/altq/altq_subr.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c index 3ade724818dd..534841289611 100644 --- a/sys/net/altq/altq_subr.c +++ b/sys/net/altq/altq_subr.c @@ -1327,12 +1327,7 @@ acc_add_filter(classifier, filter, class, phandle) return (EINVAL); #endif - afp = malloc(sizeof(struct acc_filter), - M_DEVBUF, M_WAITOK); - if (afp == NULL) - return (ENOMEM); - bzero(afp, sizeof(struct acc_filter)); - + afp = malloc(sizeof(*afp), M_DEVBUF, M_WAITOK | M_ZERO); afp->f_filter = *filter; afp->f_class = class;