aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/lapbether.c
diff options
context:
space:
mode:
authorEric Dumazet <[email protected]>2025-03-27 14:44:39 +0000
committerJakub Kicinski <[email protected]>2025-03-31 23:43:55 +0000
commit7220e8f4d4eec0b2f682eef45e2d36c092738413 (patch)
tree156d9ee5ba924b78d750cb9f6dffa0c82d332422 /drivers/net/wan/lapbether.c
parentnet: phy: broadcom: Correct BCM5221 PHY model detection (diff)
downloadkernel-7220e8f4d4eec0b2f682eef45e2d36c092738413.tar.gz
kernel-7220e8f4d4eec0b2f682eef45e2d36c092738413.zip
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: [email protected] Closes: https://lore.kernel.org/lkml/[email protected]/T/#u Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Stanislav Fomichev <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/wan/lapbether.c')
-rw-r--r--drivers/net/wan/lapbether.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index 56326f38fe8a..995a7207bdf8 100644
--- a/drivers/net/wan/lapbether.c
+++ b/drivers/net/wan/lapbether.c
@@ -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 };
@@ -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;