From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89EC14071DA; Sun, 7 Jun 2026 10:19:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780827566; cv=none; b=QcGpNlabwGKSngbEjnXVo9nTulIkhvogvwSj923K25n3GiYEAbVZZpTmJORU0AkOP/i1mOUXKQpBycrPXiDCgjumZqHXuAzwDKJCPSCQBOkU0dEptQ/NfxUy3YNFSwFNjek4F2F2gE/jVt8ESvkiCo7mLRV+dU2MVn93GhRZlQk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780827566; c=relaxed/simple; bh=iMjOz+GmkwgBzsCJlRVViPbcRcjdALsbNKNlpKzBEKc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=caLK4YgM/CaEqXuVDwFUBIq1NX7848YiBAQB/cCVRQngGMjYNf1ahIiaro7Q2jePwxn/hbrByEOYGfNR6Gg0m9awb6O/5PBpP7wtqjlk4WJFOw5oXZ1j9WbkUtT0Ccwi2E0cSRkvkmQCmuP+/9hi03BDJBlaG46Yymbh3HkVgnI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=staQIeaN; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="staQIeaN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2AEB41F00893; Sun, 7 Jun 2026 10:19:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780827565; bh=l3mJu6mggmUBxE5Ww72NbFt2g/qiSfgYVkc/gmejvGg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=staQIeaN9ZBEFtbyulj9Nf5sfX8eLV0GPxptNpP/aFn/Xb7vi8rw0mJGe3e+/Ddcy Uh7Pv4jOLGItkLW6ufNDvsYsueISWizslard6F1kQzBq+tcmH5tkdRZp+JVBb+LUV0 WYsbHSGdk4hwy65LDHThGBdEqYAY1TwQNyo5f+kI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Maxime Chevallier , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.12 069/307] ethtool: strset: fix header attribute index in ethnl_req_get_phydev() Date: Sun, 7 Jun 2026 11:57:46 +0200 Message-ID: <20260607095730.294048724@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260607095727.647295505@linuxfoundation.org> References: <20260607095727.647295505@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jakub Kicinski [ Upstream commit a8d8bef6b45bf7cc0b1f6110c5cd8d0160a9bad7 ] strset_prepare_data() passes ETHTOOL_A_HEADER_FLAGS (3) as the header attribute to ethnl_req_get_phydev(). This is incorrect, in the main attr space 3 is ETHTOOL_A_STRSET_COUNTS_ONLY, not the request header attr. The correct constant is ETHTOOL_A_STRSET_HEADER (1). ethnl_req_get_phydev() only uses this value for the extack, so this is not a "functionally visible"(?) bug. Fixes: e96c93aa4be9 ("net: ethtool: strset: Allow querying phy stats by index") Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/20260526153533.2779187-9-kuba@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/ethtool/strset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ethtool/strset.c b/net/ethtool/strset.c index b9400d18f01d58..73597f0bc923a3 100644 --- a/net/ethtool/strset.c +++ b/net/ethtool/strset.c @@ -299,7 +299,7 @@ static int strset_prepare_data(const struct ethnl_req_info *req_base, return 0; } - phydev = ethnl_req_get_phydev(req_base, tb, ETHTOOL_A_HEADER_FLAGS, + phydev = ethnl_req_get_phydev(req_base, tb, ETHTOOL_A_STRSET_HEADER, info->extack); /* phydev can be NULL, check for errors only */ -- 2.53.0