[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250415220824.94215-1-kuniyu@amazon.com>
Date: Tue, 15 Apr 2025 15:08:17 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <kuba@...nel.org>
CC: <andrew+netdev@...n.ch>, <davem@...emloft.net>, <edumazet@...gle.com>,
<horms@...nel.org>, <kuniyu@...zon.com>, <netdev@...r.kernel.org>,
<pabeni@...hat.com>, <sdf@...ichev.me>,
<syzbot+de1c7d68a10e3f123bdd@...kaller.appspotmail.com>
Subject: Re: [PATCH net] net: don't try to ops lock uninitialized devs
From: Jakub Kicinski <kuba@...nel.org>
Date: Tue, 15 Apr 2025 08:15:52 -0700
> We need to be careful when operating on dev while in rtnl_create_link().
> Some devices (vxlan) initialize netdev_ops in ->newlink, so later on.
> Avoid using netdev_lock_ops(), the device isn't registered so we
> cannot legally call its ops or generate any notifications for it.
>
> netdev_ops_assert_locked_or_invisible() is safe to use, it checks
> registration status first.
>
> Reported-by: syzbot+de1c7d68a10e3f123bdd@...kaller.appspotmail.com
> Fixes: 04efcee6ef8d ("net: hold instance lock during NETDEV_CHANGE")
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> CC: sdf@...ichev.me
> CC: kuniyu@...zon.com
>
> I wasn't sure whether Kuniyuki is going to send this or he's waiting
> for me to send.. so let me send and get this off my tracking list :)
wondering the same, thanks!
Reviewed-by: Kuniyuki Iwashima <kuniyu@...zon.com>
Powered by blists - more mailing lists