From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8093B322A0A; Mon, 18 Aug 2025 13:26:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755523588; cv=none; b=EI99vjZ2fMSdyifjis65u57bVn4/bM/bAQGNoZzgCFG9Vakonj+DCh5hl21vSjr9BgkGIU2bDQkHv/9ulEzvYHA1TvxYfCDpArKbdizWgMYt4VSLRYY59lCOWQYZngdQqpjO/jqwpMqCs+mR4kCL0rtEmWvoFOZWhHa+7Ne5W38= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755523588; c=relaxed/simple; bh=cVS9O8zk04y5ahnNS4n/au6T/9Rtb4nhdOtP4CWHh1A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MnRarbf1+Sle7YQK7dwdX9gnxZTETG/snDGai3QfuZ7SSrH6/aSWxratwnNCXkz/4DGZVCK58v3QbCHVqkivEjlPPe9wAaYjcQ1WlNNVmZm4FlIRcwV8xGwieLdkV0pC7EqUJP4zRGT2WBy1k4/WWmIoFwrDvwFM6wJBIwT5KTA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jlqt1V2A; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="jlqt1V2A" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08542C4CEEB; Mon, 18 Aug 2025 13:26:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755523588; bh=cVS9O8zk04y5ahnNS4n/au6T/9Rtb4nhdOtP4CWHh1A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jlqt1V2AqFrw04WVAu7Bq3Sz2FPlYX4BCBZbMTE7VclN6AkhChwmhbWeK+3vzYsPY YykWwiLdlt7a/OWfL25Kz2eiDKWwSQqL7CxDU8hjdp60nehgTVgvE0f6RdVl5Y8hwz 2IOdhMocCyjyx4fSpIRz93fcUrY94ATmWCEQ4lio= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Leon Romanovsky , Tariq Toukan , Michal Swiatkowski , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.15 216/515] net/mlx5e: Properly access RCU protected qdisc_sleeping variable Date: Mon, 18 Aug 2025 14:43:22 +0200 Message-ID: <20250818124506.685315154@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250818124458.334548733@linuxfoundation.org> References: <20250818124458.334548733@linuxfoundation.org> User-Agent: quilt/0.68 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.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Leon Romanovsky [ Upstream commit 2a601b2d35623065d31ebaf697b07502d54878c9 ] qdisc_sleeping variable is declared as "struct Qdisc __rcu" and as such needs proper annotation while accessing it. Without rtnl_dereference(), the following error is generated by sparse: drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:377:40: warning: incorrect type in initializer (different address spaces) drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:377:40: expected struct Qdisc *qdisc drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:377:40: got struct Qdisc [noderef] __rcu *qdisc_sleeping Signed-off-by: Leon Romanovsky Signed-off-by: Tariq Toukan Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/1752675472-201445-4-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en/qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c b/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c index f0744a45db92..4e461cb03b83 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c @@ -374,7 +374,7 @@ void mlx5e_reactivate_qos_sq(struct mlx5e_priv *priv, u16 qid, struct netdev_que void mlx5e_reset_qdisc(struct net_device *dev, u16 qid) { struct netdev_queue *dev_queue = netdev_get_tx_queue(dev, qid); - struct Qdisc *qdisc = dev_queue->qdisc_sleeping; + struct Qdisc *qdisc = rtnl_dereference(dev_queue->qdisc_sleeping); if (!qdisc) return; -- 2.39.5