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-prev] [day] [month] [year] [list]
Message-ID: <20240816030818.15677-1-kuniyu@amazon.com>
Date: Thu, 15 Aug 2024 20:08:18 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <kuba@...nel.org>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <jk@...econstruct.com.au>,
	<kuni1840@...il.com>, <kuniyu@...zon.com>, <matt@...econstruct.com.au>,
	<netdev@...r.kernel.org>, <pabeni@...hat.com>
Subject: Re: [PATCH v1 net] mctp: Use __mctp_dev_get() in mctp_fill_link_af().

From: Jakub Kicinski <kuba@...nel.org>
Date: Thu, 15 Aug 2024 18:39:46 -0700
> On Thu, 15 Aug 2024 13:42:54 -0700 Kuniyuki Iwashima wrote:
> > 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.
> 
> And this is what crashes kunit tests, I reckon.

Exactly, I missed that the helper increments the dev refcnt.
I'll use bare rcu_dereference().

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ