summaryrefslogtreecommitdiff
path: root/rust/helpers/task.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-04-15 08:15:52 -0700
committerJakub Kicinski <kuba@kernel.org>2025-04-16 18:28:11 -0700
commit4798cfa2097f0833d54d8f5ce20ef14631917839 (patch)
treec731ce67262b4d0d26934feac33f9d7ef583f58a /rust/helpers/task.c
parent2a5970d5aaff8f3e33ce3bfaa403ae88c40de40d (diff)
net: don't try to ops lock uninitialized devs
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@syzkaller.appspotmail.com Fixes: 04efcee6ef8d ("net: hold instance lock during NETDEV_CHANGE") Acked-by: Stanislav Fomichev <sdf@fomichev.me> Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com> Link: https://patch.msgid.link/20250415151552.768373-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/task.c')
0 files changed, 0 insertions, 0 deletions