lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240815204254.49813-1-kuniyu@amazon.com>
Date: Thu, 15 Aug 2024 13:42:54 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: Jeremy Kerr <jk@...econstruct.com.au>, Matt Johnston
	<matt@...econstruct.com.au>, "David S. Miller" <davem@...emloft.net>, "Eric
 Dumazet" <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
	<pabeni@...hat.com>
CC: Kuniyuki Iwashima <kuniyu@...zon.com>, Kuniyuki Iwashima
	<kuni1840@...il.com>, <netdev@...r.kernel.org>
Subject: [PATCH v1 net] mctp: Use __mctp_dev_get() in mctp_fill_link_af().

Since commit 5fa85a09390c ("net: core: rcu-ify rtnl af_ops"),
af_ops->fill_link_af() is called under RCU.

mctp_fill_link_af() calls mctp_dev_get_rtnl() that uses
rtnl_dereference(), so lockdep should complain about it.

Let's use __mctp_dev_get() instead.

Fixes: 583be982d934 ("mctp: Add device handling and netlink interface")
Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
---
 net/mctp/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mctp/device.c b/net/mctp/device.c
index acb97b257428..7ffddab01e97 100644
--- a/net/mctp/device.c
+++ b/net/mctp/device.c
@@ -366,7 +366,7 @@ static int mctp_fill_link_af(struct sk_buff *skb,
 {
 	struct mctp_dev *mdev;
 
-	mdev = mctp_dev_get_rtnl(dev);
+	mdev = __mctp_dev_get(dev);
 	if (!mdev)
 		return -ENODATA;
 	if (nla_put_u32(skb, IFLA_MCTP_NET, mdev->net))
-- 
2.30.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ