* [PATCH net] net: lapbether: use netdev_lockdep_set_classes() helper
@ 2025-03-09 9:39 Eric Dumazet
2025-03-09 9:42 ` Eric Dumazet
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Eric Dumazet @ 2025-03-09 9:39 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, Stanislav Fomichev, netdev, eric.dumazet,
Eric Dumazet, syzbot+377b71db585c9c705f8e
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/netdev/67cd611c.050a0220.14db68.0073.GAE@google.com/T/#u
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
drivers/net/wan/lapbether.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index 56326f38fe8a30f45e88cdce7efd43e18041e52a..995a7207bdf8719899bbbe58b84707eb4c2e9c1d 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;
--
2.49.0.rc0.332.g42c0ae87b1-goog
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: lapbether: use netdev_lockdep_set_classes() helper
2025-03-09 9:39 [PATCH net] net: lapbether: use netdev_lockdep_set_classes() helper Eric Dumazet
@ 2025-03-09 9:42 ` Eric Dumazet
2025-03-09 17:43 ` kernel test robot
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Eric Dumazet @ 2025-03-09 9:42 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, Stanislav Fomichev, netdev, eric.dumazet,
syzbot+377b71db585c9c705f8e
On Sun, Mar 9, 2025 at 10:39 AM Eric Dumazet <edumazet@google.com> wrote:
>
> 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/netdev/67cd611c.050a0220.14db68.0073.GAE@google.com/T/#u
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
This targets net-next tree.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: lapbether: use netdev_lockdep_set_classes() helper
2025-03-09 9:39 [PATCH net] net: lapbether: use netdev_lockdep_set_classes() helper Eric Dumazet
2025-03-09 9:42 ` Eric Dumazet
@ 2025-03-09 17:43 ` kernel test robot
2025-03-09 21:46 ` Stanislav Fomichev
2025-03-10 10:24 ` kernel test robot
3 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2025-03-09 17:43 UTC (permalink / raw)
To: Eric Dumazet, David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: oe-kbuild-all, Simon Horman, Stanislav Fomichev, netdev,
eric.dumazet, Eric Dumazet, syzbot+377b71db585c9c705f8e
Hi Eric,
kernel test robot noticed the following build errors:
[auto build test ERROR on net/main]
url: https://github.com/intel-lab-lkp/linux/commits/Eric-Dumazet/net-lapbether-use-netdev_lockdep_set_classes-helper/20250309-174127
base: net/main
patch link: https://lore.kernel.org/r/20250309093930.1359048-1-edumazet%40google.com
patch subject: [PATCH net] net: lapbether: use netdev_lockdep_set_classes() helper
config: i386-buildonly-randconfig-004-20250309 (https://download.01.org/0day-ci/archive/20250310/202503100139.oHyPmygJ-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250310/202503100139.oHyPmygJ-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503100139.oHyPmygJ-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/net/wan/lapbether.c:42:10: fatal error: net/netdev_lock.h: No such file or directory
42 | #include <net/netdev_lock.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
vim +42 drivers/net/wan/lapbether.c
41
> 42 #include <net/netdev_lock.h>
43 #include <net/x25device.h>
44
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: lapbether: use netdev_lockdep_set_classes() helper
2025-03-09 9:39 [PATCH net] net: lapbether: use netdev_lockdep_set_classes() helper Eric Dumazet
2025-03-09 9:42 ` Eric Dumazet
2025-03-09 17:43 ` kernel test robot
@ 2025-03-09 21:46 ` Stanislav Fomichev
2025-03-10 10:24 ` kernel test robot
3 siblings, 0 replies; 7+ messages in thread
From: Stanislav Fomichev @ 2025-03-09 21:46 UTC (permalink / raw)
To: Eric Dumazet
Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, Simon Horman,
Stanislav Fomichev, netdev, eric.dumazet,
syzbot+377b71db585c9c705f8e
On 03/09, Eric Dumazet wrote:
> 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/netdev/67cd611c.050a0220.14db68.0073.GAE@google.com/T/#u
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: lapbether: use netdev_lockdep_set_classes() helper
2025-03-09 9:39 [PATCH net] net: lapbether: use netdev_lockdep_set_classes() helper Eric Dumazet
` (2 preceding siblings ...)
2025-03-09 21:46 ` Stanislav Fomichev
@ 2025-03-10 10:24 ` kernel test robot
3 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2025-03-10 10:24 UTC (permalink / raw)
To: Eric Dumazet, David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: llvm, oe-kbuild-all, Simon Horman, Stanislav Fomichev, netdev,
eric.dumazet, Eric Dumazet, syzbot+377b71db585c9c705f8e
Hi Eric,
kernel test robot noticed the following build errors:
[auto build test ERROR on net/main]
url: https://github.com/intel-lab-lkp/linux/commits/Eric-Dumazet/net-lapbether-use-netdev_lockdep_set_classes-helper/20250309-174127
base: net/main
patch link: https://lore.kernel.org/r/20250309093930.1359048-1-edumazet%40google.com
patch subject: [PATCH net] net: lapbether: use netdev_lockdep_set_classes() helper
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20250310/202503101824.VtjtbcKN-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250310/202503101824.VtjtbcKN-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503101824.VtjtbcKN-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/net/wan/lapbether.c:27:
In file included from include/linux/net.h:24:
In file included from include/linux/mm.h:2224:
include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
505 | item];
| ~~~~
include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
512 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
525 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wan/lapbether.c:42:10: fatal error: 'net/netdev_lock.h' file not found
42 | #include <net/netdev_lock.h>
| ^~~~~~~~~~~~~~~~~~~
3 warnings and 1 error generated.
vim +42 drivers/net/wan/lapbether.c
41
> 42 #include <net/netdev_lock.h>
43 #include <net/x25device.h>
44
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net] net: lapbether: use netdev_lockdep_set_classes() helper
@ 2025-03-27 14:44 Eric Dumazet
2025-04-01 0:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 7+ messages in thread
From: Eric Dumazet @ 2025-03-27 14:44 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, netdev, eric.dumazet, Eric Dumazet,
syzbot+377b71db585c9c705f8e, Stanislav Fomichev
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>
---
drivers/net/wan/lapbether.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index 56326f38fe8a30f45e88cdce7efd43e18041e52a..995a7207bdf8719899bbbe58b84707eb4c2e9c1d 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;
--
2.49.0.395.g12beb8f557-goog
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: lapbether: use netdev_lockdep_set_classes() helper
2025-03-27 14:44 Eric Dumazet
@ 2025-04-01 0:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-04-01 0:10 UTC (permalink / raw)
To: Eric Dumazet
Cc: davem, kuba, pabeni, horms, netdev, eric.dumazet,
syzbot+377b71db585c9c705f8e, sdf
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 27 Mar 2025 14:44:39 +0000 you wrote:
> 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")
>
> [...]
Here is the summary with links:
- [net] net: lapbether: use netdev_lockdep_set_classes() helper
https://git.kernel.org/netdev/net/c/7220e8f4d4ee
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-04-01 0:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-09 9:39 [PATCH net] net: lapbether: use netdev_lockdep_set_classes() helper Eric Dumazet
2025-03-09 9:42 ` Eric Dumazet
2025-03-09 17:43 ` kernel test robot
2025-03-09 21:46 ` Stanislav Fomichev
2025-03-10 10:24 ` kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2025-03-27 14:44 Eric Dumazet
2025-04-01 0:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).