From nobody Tue Feb 28 16:58:29 2023 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 4PR3Tx54dlz3tgb0; Tue, 28 Feb 2023 16:58:29 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PR3Tx4YRMz3Mtp; Tue, 28 Feb 2023 16:58:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677603509; 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=8FL0ato1mifR0rfdS3WsQDweuJqKCwOFvyTGmFS4v3U=; b=IZy0eIOyV0+T8DeEzaBXJeiW95UCsHC7iJGri/J4bcHyvNOnXuy9Nzqd9lFSvtE14Cyc2A ro+1vxUiPp/qwqKTdMgFfL8FGgvwdwZcfRF/XsHYDq+X7HE4DhbYZfugWpRQZDBotVJe8p FtUSCh8JtUiTkM9A6YWQk+ixuN9oUjYvMiPyeN2zRFcJBog6BAqsfHd5DzsaAVFv/er1Fj zuILlM+Y1kAW0wuLqLj8js8t36gFBGSgatlbrCY3MElzm8RCONr5ZnJgYt31utc0idroMd bbsHagZVMmuKBEYJeuY2TXm5TMTI2ipSLEoGFnmKEof0OuwU90AbQri1eEm9qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677603509; 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=8FL0ato1mifR0rfdS3WsQDweuJqKCwOFvyTGmFS4v3U=; b=dhVzFpBNeikMjk4I2Hkqk5bE+sU5YeIkjUYEPW4rXvz9M46fbd1Be39OFoNu3yLqLkxVfg 2FKkvETdTjweWaucXxDZYJuR8fIU6pbNBCfPG4VCGIwI/7PXUne32eQK9oP2eDn91XW14P WzvOH8/ANSlpmj8g7aqcCY+qsvXlUBozNJki87KiTTB88KlJicNFBWvIeZJW6oaC2bZOBC bSshmVigH3GAicy+MZ3TRw+pZaAAPkOXeUtYkMaErOHDSuO1PtSO8+3PmWaMQKyKRclq56 vZrLMv20JNVDSDYdJ4U58/gLt8gk2NYybgn8oyulHTjXSrcdRDAPXt2F6GLjJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677603509; a=rsa-sha256; cv=none; b=i23kc5H801dd1PrGjONM7XvL0X28l6OP2wOEds0FG4RxL82bMNTaMbiK13WIbpqynzFOiU ONyT2qw1Uj4/Iy4IRAWE3S18ROGSqmIU7GEYaR5aLRttRi+lScHV165SlhhqoBjI8+iEvy 1I1Zr8XegYfcNT34IxPzOmUrOBusb+nzHToeAYYo5n0Kp/lWGb/HaMXWS9qZoB6fdfEDHD Ya4O0RzyggsdY4I3oxqf2BNOyRgvwf/msvWINwIuPzQCP6NMrWKKYwInwjqg1sbraROV0b 5Mo2sPeJ/5tu3wV9PuUCqxOS0ketbr1pln4JEpEis9atQonKzx609N8PEpwY+w== 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 4PR3Tx3VrRz1DxS; Tue, 28 Feb 2023 16:58:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31SGwT0I069377; Tue, 28 Feb 2023 16:58:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31SGwTxp069376; Tue, 28 Feb 2023 16:58:29 GMT (envelope-from git) Date: Tue, 28 Feb 2023 16:58:29 GMT Message-Id: <202302281658.31SGwTxp069376@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 5f7bea295283 - main - iflib: fix regression with new pfil(9) KPI 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f7bea2952830ae60d4b65dafdc8411ac9d991f0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=5f7bea2952830ae60d4b65dafdc8411ac9d991f0 commit 5f7bea2952830ae60d4b65dafdc8411ac9d991f0 Author: Gleb Smirnoff AuthorDate: 2023-02-28 16:56:20 +0000 Commit: Gleb Smirnoff CommitDate: 2023-02-28 16:56:20 +0000 iflib: fix regression with new pfil(9) KPI Do not pass the pointer to our valid mbuf to pfil(9). Pass an uninitialized one only. This was unsafe with the old KPI, too, but for some reason didn't fail. Fixes: caf32b260ad46b17a4c1a8ce6383e37ac489f023 --- sys/net/iflib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 39f3ccea4317..807ada5eb754 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2713,7 +2713,6 @@ rxd_frag_to_sd(iflib_rxq_t rxq, if_rxd_frag_t irf, bool unload, if_rxsd_t sd, cidx = irf->irf_idx; fl = &rxq->ifr_fl[flid]; sd->ifsd_fl = fl; - m = fl->ifl_sds.ifsd_m[cidx]; sd->ifsd_cl = &fl->ifl_sds.ifsd_cl[cidx]; fl->ifl_credits--; #if MEMORY_LOGGING @@ -2754,12 +2753,14 @@ rxd_frag_to_sd(iflib_rxq_t rxq, if_rxd_frag_t irf, bool unload, if_rxsd_t sd, * Filter said it was OK, so receive like * normal */ + m = fl->ifl_sds.ifsd_m[cidx]; fl->ifl_sds.ifsd_m[cidx] = NULL; break; default: MPASS(0); } } else { + m = fl->ifl_sds.ifsd_m[cidx]; fl->ifl_sds.ifsd_m[cidx] = NULL; if (pf_rv != NULL) *pf_rv = PFIL_PASS;