Skip to content

Commit

Permalink
net: lapbether: use netdev_lockdep_set_classes() helper
Browse files Browse the repository at this point in the history
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 9bfc9d6 ("hamradio:
use netdev_lockdep_set_classes() helper")

Fixes: 7e4d784 ("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>
  • Loading branch information
Eric Dumazet authored and Jakub Kicinski committed Mar 31, 2025
1 parent 4f1eaab commit 7220e8f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wan/lapbether.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <linux/lapb.h>
#include <linux/init.h>

#include <net/netdev_lock.h>
#include <net/x25device.h>

static const u8 bcast_addr[6] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
Expand Down Expand Up @@ -366,6 +367,7 @@ static const struct net_device_ops lapbeth_netdev_ops = {

static void lapbeth_setup(struct net_device *dev)
{
netdev_lockdep_set_classes(dev);
dev->netdev_ops = &lapbeth_netdev_ops;
dev->needs_free_netdev = true;
dev->type = ARPHRD_X25;
Expand Down

0 comments on commit 7220e8f

Please sign in to comment.