Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: lapbether: use netdev_lockdep_set_classes() helper

drivers/net/wan/lapbether.c uses stacked devices.
Like similar drivers, it must use netdev_lockdep_set_classes()
to avoid LOCKDEP splats.

This is similar to commit 9bfc9d65a1dc ("hamradio:
use netdev_lockdep_set_classes() helper")

Fixes: 7e4d784f5810 ("net: hold netdev instance lock during rtnetlink operations")
Reported-by: syzbot+377b71db585c9c705f8e@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/lkml/67cd611c.050a0220.14db68.0073.GAE@google.com/T/#u
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20250327144439.2463509-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Eric Dumazet and committed by
Jakub Kicinski
7220e8f4 4f1eaabb

+2
+2
drivers/net/wan/lapbether.c
··· 39 39 #include <linux/lapb.h> 40 40 #include <linux/init.h> 41 41 42 + #include <net/netdev_lock.h> 42 43 #include <net/x25device.h> 43 44 44 45 static const u8 bcast_addr[6] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; ··· 367 366 368 367 static void lapbeth_setup(struct net_device *dev) 369 368 { 369 + netdev_lockdep_set_classes(dev); 370 370 dev->netdev_ops = &lapbeth_netdev_ops; 371 371 dev->needs_free_netdev = true; 372 372 dev->type = ARPHRD_X25;