* [PATCH net] net: update netdev_lock_{type,name}
@ 2026-01-06 16:43 Eric Dumazet
2026-01-06 19:30 ` Jakub Kicinski
2026-01-07 7:29 ` [syzbot ci] " syzbot ci
0 siblings, 2 replies; 5+ messages in thread
From: Eric Dumazet @ 2026-01-06 16:43 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, netdev, eric.dumazet, Eric Dumazet
Add missing entries in netdev_lock_type[] and netdev_lock_name[] :
CAN, MCTP, RAWIP, CAIF, IP6GRE, 6LOWPAN.
Also add a WARN_ONCE() in netdev_lock_pos() to help future bug hunting
next time a protocol is added without updating these arrays.
Fixes: 1a33e10e4a95 ("net: partially revert dynamic lockdep key changes")
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/core/dev.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 36dc5199037edb1506e67f6ab5e977ff41efef59..5d6e69a7819a8967fcc5089b1797d47891fec4d6 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -478,15 +478,19 @@ static const unsigned short netdev_lock_type[] = {
ARPHRD_IEEE1394, ARPHRD_EUI64, ARPHRD_INFINIBAND, ARPHRD_SLIP,
ARPHRD_CSLIP, ARPHRD_SLIP6, ARPHRD_CSLIP6, ARPHRD_RSRVD,
ARPHRD_ADAPT, ARPHRD_ROSE, ARPHRD_X25, ARPHRD_HWX25,
+ ARPHRD_CAN, ARPHRD_MCTP,
ARPHRD_PPP, ARPHRD_CISCO, ARPHRD_LAPB, ARPHRD_DDCMP,
- ARPHRD_RAWHDLC, ARPHRD_TUNNEL, ARPHRD_TUNNEL6, ARPHRD_FRAD,
+ ARPHRD_RAWHDLC, ARPHRD_RAWIP,
+ ARPHRD_TUNNEL, ARPHRD_TUNNEL6, ARPHRD_FRAD,
ARPHRD_SKIP, ARPHRD_LOOPBACK, ARPHRD_LOCALTLK, ARPHRD_FDDI,
ARPHRD_BIF, ARPHRD_SIT, ARPHRD_IPDDP, ARPHRD_IPGRE,
ARPHRD_PIMREG, ARPHRD_HIPPI, ARPHRD_ASH, ARPHRD_ECONET,
ARPHRD_IRDA, ARPHRD_FCPP, ARPHRD_FCAL, ARPHRD_FCPL,
ARPHRD_FCFABRIC, ARPHRD_IEEE80211, ARPHRD_IEEE80211_PRISM,
ARPHRD_IEEE80211_RADIOTAP, ARPHRD_PHONET, ARPHRD_PHONET_PIPE,
- ARPHRD_IEEE802154, ARPHRD_VOID, ARPHRD_NONE};
+ ARPHRD_IEEE802154,
+ ARPHRD_CAIF, ARPHRD_IP6GRE, ARPHRD_6LOWPAN,
+ ARPHRD_VOID, ARPHRD_NONE};
static const char *const netdev_lock_name[] = {
"_xmit_NETROM", "_xmit_ETHER", "_xmit_EETHER", "_xmit_AX25",
@@ -495,15 +499,19 @@ static const char *const netdev_lock_name[] = {
"_xmit_IEEE1394", "_xmit_EUI64", "_xmit_INFINIBAND", "_xmit_SLIP",
"_xmit_CSLIP", "_xmit_SLIP6", "_xmit_CSLIP6", "_xmit_RSRVD",
"_xmit_ADAPT", "_xmit_ROSE", "_xmit_X25", "_xmit_HWX25",
+ "_xmit_CAN", "_xmit_MCTP",
"_xmit_PPP", "_xmit_CISCO", "_xmit_LAPB", "_xmit_DDCMP",
- "_xmit_RAWHDLC", "_xmit_TUNNEL", "_xmit_TUNNEL6", "_xmit_FRAD",
+ "_xmit_RAWHDLC", "_xmit_RAWIP",
+ "_xmit_TUNNEL", "_xmit_TUNNEL6", "_xmit_FRAD",
"_xmit_SKIP", "_xmit_LOOPBACK", "_xmit_LOCALTLK", "_xmit_FDDI",
"_xmit_BIF", "_xmit_SIT", "_xmit_IPDDP", "_xmit_IPGRE",
"_xmit_PIMREG", "_xmit_HIPPI", "_xmit_ASH", "_xmit_ECONET",
"_xmit_IRDA", "_xmit_FCPP", "_xmit_FCAL", "_xmit_FCPL",
"_xmit_FCFABRIC", "_xmit_IEEE80211", "_xmit_IEEE80211_PRISM",
"_xmit_IEEE80211_RADIOTAP", "_xmit_PHONET", "_xmit_PHONET_PIPE",
- "_xmit_IEEE802154", "_xmit_VOID", "_xmit_NONE"};
+ "_xmit_IEEE802154",
+ "_xmit_CAIF", "_xmit_IP6GRE", "_xmit_6LOWPAN",
+ "_xmit_VOID", "_xmit_NONE"};
static struct lock_class_key netdev_xmit_lock_key[ARRAY_SIZE(netdev_lock_type)];
static struct lock_class_key netdev_addr_lock_key[ARRAY_SIZE(netdev_lock_type)];
@@ -516,6 +524,7 @@ static inline unsigned short netdev_lock_pos(unsigned short dev_type)
if (netdev_lock_type[i] == dev_type)
return i;
/* the last key is used by default */
+ WARN_ONCE(1, "netdev_lock_pos() could not find dev_type=%u\n", dev_type);
return ARRAY_SIZE(netdev_lock_type) - 1;
}
--
2.52.0.351.gbe84eed79e-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: update netdev_lock_{type,name}
2026-01-06 16:43 [PATCH net] net: update netdev_lock_{type,name} Eric Dumazet
@ 2026-01-06 19:30 ` Jakub Kicinski
2026-01-06 19:43 ` Eric Dumazet
2026-01-07 7:29 ` [syzbot ci] " syzbot ci
1 sibling, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2026-01-06 19:30 UTC (permalink / raw)
To: Eric Dumazet
Cc: David S . Miller, Paolo Abeni, Simon Horman, netdev, eric.dumazet
On Tue, 6 Jan 2026 16:43:38 +0000 Eric Dumazet wrote:
> Add missing entries in netdev_lock_type[] and netdev_lock_name[] :
>
> CAN, MCTP, RAWIP, CAIF, IP6GRE, 6LOWPAN.
>
> Also add a WARN_ONCE() in netdev_lock_pos() to help future bug hunting
> next time a protocol is added without updating these arrays.
Looks like we're missing ARPHRD_NETLINK
https://netdev-ctrl.bots.linux.dev/logs/vmksft/bonding-dbg/results/462041/14-bond-eth-type-change-sh/stderr
--
pw-bot: cr
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: update netdev_lock_{type,name}
2026-01-06 19:30 ` Jakub Kicinski
@ 2026-01-06 19:43 ` Eric Dumazet
2026-01-06 19:45 ` Eric Dumazet
0 siblings, 1 reply; 5+ messages in thread
From: Eric Dumazet @ 2026-01-06 19:43 UTC (permalink / raw)
To: Jakub Kicinski
Cc: David S . Miller, Paolo Abeni, Simon Horman, netdev, eric.dumazet
On Tue, Jan 6, 2026 at 8:30 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Tue, 6 Jan 2026 16:43:38 +0000 Eric Dumazet wrote:
> > Add missing entries in netdev_lock_type[] and netdev_lock_name[] :
> >
> > CAN, MCTP, RAWIP, CAIF, IP6GRE, 6LOWPAN.
> >
> > Also add a WARN_ONCE() in netdev_lock_pos() to help future bug hunting
> > next time a protocol is added without updating these arrays.
>
> Looks like we're missing ARPHRD_NETLINK
Thanks, I will add this to V2.
>
> https://netdev-ctrl.bots.linux.dev/logs/vmksft/bonding-dbg/results/462041/14-bond-eth-type-change-sh/stderr
> --
> pw-bot: cr
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: update netdev_lock_{type,name}
2026-01-06 19:43 ` Eric Dumazet
@ 2026-01-06 19:45 ` Eric Dumazet
0 siblings, 0 replies; 5+ messages in thread
From: Eric Dumazet @ 2026-01-06 19:45 UTC (permalink / raw)
To: Jakub Kicinski
Cc: David S . Miller, Paolo Abeni, Simon Horman, netdev, eric.dumazet
On Tue, Jan 6, 2026 at 8:43 PM Eric Dumazet <edumazet@google.com> wrote:
>
> On Tue, Jan 6, 2026 at 8:30 PM Jakub Kicinski <kuba@kernel.org> wrote:
> >
> > On Tue, 6 Jan 2026 16:43:38 +0000 Eric Dumazet wrote:
> > > Add missing entries in netdev_lock_type[] and netdev_lock_name[] :
> > >
> > > CAN, MCTP, RAWIP, CAIF, IP6GRE, 6LOWPAN.
> > >
> > > Also add a WARN_ONCE() in netdev_lock_pos() to help future bug hunting
> > > next time a protocol is added without updating these arrays.
> >
> > Looks like we're missing ARPHRD_NETLINK
>
> Thanks, I will add this to V2.
Also ARPHRD_VSOCKMON.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [syzbot ci] Re: net: update netdev_lock_{type,name}
2026-01-06 16:43 [PATCH net] net: update netdev_lock_{type,name} Eric Dumazet
2026-01-06 19:30 ` Jakub Kicinski
@ 2026-01-07 7:29 ` syzbot ci
1 sibling, 0 replies; 5+ messages in thread
From: syzbot ci @ 2026-01-07 7:29 UTC (permalink / raw)
To: davem, edumazet, eric.dumazet, horms, kuba, netdev, pabeni
Cc: syzbot, syzkaller-bugs
syzbot ci has tested the following series
[v1] net: update netdev_lock_{type,name}
https://lore.kernel.org/all/20260106164338.1738035-1-edumazet@google.com
* [PATCH net] net: update netdev_lock_{type,name}
and found the following issue:
WARNING in netdev_init_one_queue
Full report is available here:
https://ci.syzbot.org/series/68d4719e-5ae3-402a-a73d-99450d0774b4
***
WARNING in netdev_init_one_queue
tree: net
URL: https://kernel.googlesource.com/pub/scm/linux/kernel/git/netdev/net.git
base: 1806d210e5a8f431ad4711766ae4a333d407d972
arch: amd64
compiler: Debian clang version 21.1.8 (++20251202083448+f68f64eb8130-1~exp1~20251202083504.46), Debian LLD 21.1.8
config: https://ci.syzbot.org/builds/1c4d3398-ae52-417f-943e-84be818a07a6/config
------------[ cut here ]------------
netdev_lock_pos() could not find dev_type=824
WARNING: net/core/dev.c:527 at netdev_init_one_queue+0x1c5/0x440, CPU#1: syz-executor/6079
Modules linked in:
CPU: 1 UID: 0 PID: 6079 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
RIP: 0010:netdev_init_one_queue+0x1c7/0x440
Code: bf 3f 00 00 00 e8 b9 14 74 f8 66 41 83 ff 3e 0f 87 59 01 00 00 e8 09 11 74 f8 eb 19 e8 02 11 74 f8 48 8d 3d 3b 32 82 06 89 ee <67> 48 0f b9 3a 41 bf 3e 00 00 00 4e 8d 24 fd e0 1f 90 8c 4c 89 e0
RSP: 0018:ffffc90005487020 EFLAGS: 00010293
RAX: ffffffff894e61fe RBX: ffff88816c381000 RCX: ffff8881047257c0
RDX: 0000000000000000 RSI: 0000000000000338 RDI: ffffffff8fd09440
RBP: 0000000000000338 R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000000010 R11: ffffffff81ae36b0 R12: 000000000000fffe
R13: dffffc0000000000 R14: 000000000000003e R15: ffffffff8c9022d8
FS: 0000555586066500(0000) GS:ffff8882a9a0f000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555586079888 CR3: 000000011929a000 CR4: 00000000000006f0
Call Trace:
<TASK>
alloc_netdev_mqs+0x937/0x11b0
rtnl_create_link+0x31f/0xd70
rtnl_newlink_create+0x277/0xb70
rtnl_newlink+0x1666/0x1be0
rtnetlink_rcv_msg+0x7d5/0xbe0
netlink_rcv_skb+0x232/0x4b0
netlink_unicast+0x80f/0x9b0
netlink_sendmsg+0x813/0xb40
__sock_sendmsg+0x21c/0x270
__sys_sendto+0x3c0/0x550
__x64_sys_sendto+0xde/0x100
do_syscall_64+0xe2/0xf80
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fcc51555ed7
Code: 48 89 fa 4c 89 df e8 a8 56 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007ffe07b19fa0 EFLAGS: 00000202 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 0000555586066500 RCX: 00007fcc51555ed7
RDX: 000000000000004c RSI: 00007fcc52334670 RDI: 0000000000000003
RBP: 0000000000000001 R08: 00007ffe07b1a004 R09: 000000000000000c
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000003
R13: 0000000000000000 R14: 00007fcc52334670 R15: 0000000000000000
</TASK>
***
If these findings have caused you to resend the series or submit a
separate fix, please add the following tag to your commit message:
Tested-by: syzbot@syzkaller.appspotmail.com
---
This report is generated by a bot. It may contain errors.
syzbot ci engineers can be reached at syzkaller@googlegroups.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-01-07 7:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-06 16:43 [PATCH net] net: update netdev_lock_{type,name} Eric Dumazet
2026-01-06 19:30 ` Jakub Kicinski
2026-01-06 19:43 ` Eric Dumazet
2026-01-06 19:45 ` Eric Dumazet
2026-01-07 7:29 ` [syzbot ci] " syzbot ci
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox