From nobody Tue May 27 17:54:35 2025 X-Original-To: dev-commits-src-main@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 4b6Kyh33nsz5xhgf; Tue, 27 May 2025 17:54:36 +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 4b6Kyh1JJGz3jqV; Tue, 27 May 2025 17:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748368476; 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=bFhspppvg0/zLDBgFq8+KHgm+H5jc2cBU+Qi4pUV+Bc=; b=MxMSz8z0/1YERXX+mRAP8vd7hgjtede8KLm1wamSl0DD1C+ROtDNED63Vtfqzpn95/7TTu H5ruJw/jMo9zvVv6p6bZxkZkD8QmFkwDlbEQCtj8XZhiMW2rIUxyDXx2AiCBJX8Y/F7KaF aRfCjMXkWF5Ky2IZEkhTkVEKy1fpxsyIaTA9xHogcoMzGNpSy0jQUQHiPSURZeyga/kyuT bohOEb69dCuaNOM7Q6pdLbPRnbNqzl3eVDF0vLn1zp0n+UM0mnAjx3iJQ1MvnTtd+cmrgt Lfm9j3x5f6inxkb7FrBNIYt07OU0AMFZXd5yYAt2Mb6Jny2A/hOM8Ufuumadmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1748368476; a=rsa-sha256; cv=none; b=Y4A8qFdsNu4G5PmyvKiwd2Mbbi0cdYAsHxy9djayf2ErPI4OLSjWDaiu+AaUGiq68whTVp Xsf5uQfamOfWz7pNG7rfLA6qy/WEnG6n4HLB6hhRMn2SygV6QUvmw34+Km0iCjGHmXqz0S Vo2JDCx9ccnrorpXNYBtPJeVpnBqd6qQVAJbLb15JAd+LACfU17e+C5snoMKyAg61yfwkQ QmDP9wbn1vbhJuUimgvY0qyB/gSuPLe/0QIu/UimdfpNUe30YPKtPLzfZCNp5P0egI462p t0MxdjCueXge8uyx3K6ADgn2YkHFBUCPB8VkUXIV2gZ4SYwZ4NeJtVu/25yktA== 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=1748368476; 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=bFhspppvg0/zLDBgFq8+KHgm+H5jc2cBU+Qi4pUV+Bc=; b=jYwaa88trmPpsjFegxXzLw0UbP4Faqs3V2QwBDklNX+RHMhR0lYmlN+gzyNpxxEkKVmfrJ nYnWGO8GJZuUvK8myrAxYamHGrxBYJYFHPCe07M7y6UoW4eZFBI0WtBkpBHozVN8lYswi8 DbP9Bh9NCmtdd2kvvp+17TGnio2jiUS1q/byDmniutvS0ccXTF3m90oXCjK/mASEhNIqLr f3k/r6XYzbtBW9pMzNnIOk6lhN58uMUsmjwZcnIbdM4eHnQlr8XzRv4rHWCs2dW5HFQBS3 Ko0b/FEah/UG1W8+cixVSw+AfYKGJeksxktrWs9Ke9DC628tLYGrIlBCqWa2pQ== 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 4b6Kyh0dQyz12nX; Tue, 27 May 2025 17:54:36 +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 54RHsZ1a003641; Tue, 27 May 2025 17:54:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54RHsZMu003638; Tue, 27 May 2025 17:54:35 GMT (envelope-from git) Date: Tue, 27 May 2025 17:54:35 GMT Message-Id: <202505271754.54RHsZMu003638@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e0267657f396 - main - e1000: Initialize helper variables in em_newitr() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0267657f3965a56d877075fe3d4d41b8afb2faf Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e0267657f3965a56d877075fe3d4d41b8afb2faf commit e0267657f3965a56d877075fe3d4d41b8afb2faf Author: Mark Johnston AuthorDate: 2025-05-27 16:31:06 +0000 Commit: Mark Johnston CommitDate: 2025-05-27 17:33:39 +0000 e1000: Initialize helper variables in em_newitr() Due to races with the threaded transmit and receive paths, it's possible to have r/tx_bytes != 0 && r/tx_packets == 0, in which case the maximum byte count could be left uninitialized. Initialize them to zero to handle this case. PR: 286819 Reviewed by: kbowling MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50416 --- sys/dev/e1000/if_em.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index f49682285875..27500f936c25 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1671,6 +1671,7 @@ em_newitr(struct e1000_softc *sc, struct em_rx_queue *que, goto em_set_next_itr; } + bytes = bytes_packets = 0; /* Get largest values from the associated tx and rx ring */ if (txr->tx_bytes && txr->tx_packets) { bytes = txr->tx_bytes;