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 694641DAC95; Tue, 26 Aug 2025 13:21:20 +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=1756214481; cv=none; b=mFZrO04xhJrFjh/gIgpIZ4E+fno9RI8mO10NQMGel/9mrYkRKRoxKTsO2R7SlkbZpFJs+txlG6GmuFtaL5dRSGHBZfNzAZ909NxNUW3jHC9Nlvk22ecLiAMBeW1RMMTIQOfPRDV/NSov/6vhzhD97Rfv3ajgBB68irIg2fqgxI0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756214481; c=relaxed/simple; bh=pEw/rkBdOMA4jZzSfjbzOfnj78hiATcSZZ3VSJ7N88M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qP+frA4NFXskfEYslh8b62iIUG5EXYJcJBBSVS26MYpU1SOo+fnQabIye77ck6zCJmpL2x1jgYiCg40O/3HjGnuyLwkeN1pPQip17/MODtoyjvEdMXwfa5fW2Pof3v/OK5IidcQ8gFwP//s7sKl+Keh5LzUkEoRayJqOmgKa+6M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hIg7YNIO; 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="hIg7YNIO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F9CEC4CEF1; Tue, 26 Aug 2025 13:21:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756214479; bh=pEw/rkBdOMA4jZzSfjbzOfnj78hiATcSZZ3VSJ7N88M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hIg7YNIOnLavHa6kDKfAg2jKA/dYts+7GVQGuQY5nLi53f7AHFuZ65NGWmdNhfgdt tDzTNv9D7RukEdPT+3aZSnk8OVlYvZQWrD7gIuIYiLtSSFT7444Lbn/5+7BnXXwzUK 07ATTnqlOY7U/uzqow0iAG6yA/5TikPIiueOEECM= 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.1 122/482] net/mlx5e: Properly access RCU protected qdisc_sleeping variable Date: Tue, 26 Aug 2025 13:06:15 +0200 Message-ID: <20250826110933.836770939@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250826110930.769259449@linuxfoundation.org> References: <20250826110930.769259449@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.1-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 1e887d640cff..c72ac4dbdb21 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c @@ -362,7 +362,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