* RTNL: assertion failed at net/core/dev.c
@ 2007-09-02 16:05 Christian Kujau
2007-09-02 16:13 ` Stephen Hemminger
2007-09-02 16:13 ` Johannes Berg
0 siblings, 2 replies; 9+ messages in thread
From: Christian Kujau @ 2007-09-02 16:05 UTC (permalink / raw)
To: linux-kernel; +Cc: netdev
Wow, I should really update more often. Skipping the last -rc versions
AND adding a new device (zd1211rw) to the box turns out to be quite
interesting ([0],[1]).
However, this time loading of a (proprietary) module is involved. Knowing
that lkml cannot really help here (and I should contact vmware), I just
wanted to let you netdev guys know, because the only occurences I found
on the net were from 1999, but given the amount of changes currently
going into net/ I thought this might be interesting:
[15604.137408] RTNL: assertion failed at net/core/dev.c (2595)
[15604.137772] [<c0106aaa>] show_trace_log_lvl+0x1a/0x30
[15604.138121] [<c0107682>] show_trace+0x12/0x20
[15604.138449] [<c01076a5>] dump_stack+0x15/0x20
[15604.138807] [<c038c612>] __dev_set_promiscuity+0xc2/0xd0
[15604.139163] [<c038c9bb>] dev_set_promiscuity+0x1b/0x40
[15604.139515] [<f91cb3fb>] VNetBridgeStartPromisc+0x2b/0x50 [vmnet]
[15604.139896] [<f91cb61a>] VNetBridgePortsChanged+0x2a/0x40 [vmnet]
[15604.140276] [<f91c9a65>] VNetHubPortsChanged+0x65/0xc0 [vmnet]
[15604.140648] [<f91c869a>] VNetConnect+0x7a/0xb0 [vmnet]
[15604.141000] [<f91c926d>] VNetFileOpOpen+0xbd/0x170 [vmnet]
[15604.141362] [<c016b213>] chrdev_open+0x83/0x180
[15604.141696] [<c0167321>] __dentry_open+0xa1/0x1a0
[15604.142036] [<c01674c5>] nameidata_to_filp+0x35/0x40
[15604.142383] [<c0167519>] do_filp_open+0x49/0x60
[15604.142717] [<c0167575>] do_sys_open+0x45/0x80
[15604.142957] [<c01675ec>] sys_open+0x1c/0x20
[15604.143087] [<c010598a>] sysenter_past_esp+0x6b/0xb5
[15604.143227] =======================
details: http://nerdbynature.de/bits/2.6.23-rc5/
Christian.
[0] http://www.spinics.net/lists/netdev/msg40247.html
[1] http://www.spinics.net/lists/netdev/msg40281.html
--
BOFH excuse #31:
cellular telephone interference
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: RTNL: assertion failed at net/core/dev.c
2007-09-02 16:05 RTNL: assertion failed at net/core/dev.c Christian Kujau
@ 2007-09-02 16:13 ` Stephen Hemminger
2007-09-02 18:04 ` Christian Kujau
2007-09-02 16:13 ` Johannes Berg
1 sibling, 1 reply; 9+ messages in thread
From: Stephen Hemminger @ 2007-09-02 16:13 UTC (permalink / raw)
To: Christian Kujau; +Cc: linux-kernel, netdev
On Sun, 2 Sep 2007 18:05:33 +0200 (CEST)
Christian Kujau <lists@nerdbynature.de> wrote:
> Wow, I should really update more often. Skipping the last -rc versions
> AND adding a new device (zd1211rw) to the box turns out to be quite
> interesting ([0],[1]).
>
> However, this time loading of a (proprietary) module is involved. Knowing
> that lkml cannot really help here (and I should contact vmware), I just
> wanted to let you netdev guys know, because the only occurences I found
> on the net were from 1999, but given the amount of changes currently
> going into net/ I thought this might be interesting:
>
> [15604.137408] RTNL: assertion failed at net/core/dev.c (2595)
> [15604.137772] [<c0106aaa>] show_trace_log_lvl+0x1a/0x30
> [15604.138121] [<c0107682>] show_trace+0x12/0x20
> [15604.138449] [<c01076a5>] dump_stack+0x15/0x20
> [15604.138807] [<c038c612>] __dev_set_promiscuity+0xc2/0xd0
> [15604.139163] [<c038c9bb>] dev_set_promiscuity+0x1b/0x40
> [15604.139515] [<f91cb3fb>] VNetBridgeStartPromisc+0x2b/0x50 [vmnet]
Vendor module calls kernel api incorrectly. dev_set_promiscuity requires
that the calling thread hold rtnl mutex (ie call rtnl_lock). It's their bug,
netdev doesn't want to hear about it.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: RTNL: assertion failed at net/core/dev.c
2007-09-02 16:13 ` Stephen Hemminger
@ 2007-09-02 18:04 ` Christian Kujau
0 siblings, 0 replies; 9+ messages in thread
From: Christian Kujau @ 2007-09-02 18:04 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Christian Kujau, linux-kernel, netdev, johannes
On Sun, 2 Sep 2007, Stephen Hemminger wrote:
> Vendor module calls kernel api incorrectly. dev_set_promiscuity requires
> that the calling thread hold rtnl mutex (ie call rtnl_lock). It's their bug,
> netdev doesn't want to hear about it.
OK, that's all I needed to know. Thank you both for your comments!
Christian.
--
BOFH excuse #435:
Internet shut down due to maintenance
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: RTNL: assertion failed at net/core/dev.c
2007-09-02 16:05 RTNL: assertion failed at net/core/dev.c Christian Kujau
2007-09-02 16:13 ` Stephen Hemminger
@ 2007-09-02 16:13 ` Johannes Berg
1 sibling, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2007-09-02 16:13 UTC (permalink / raw)
To: Christian Kujau; +Cc: linux-kernel, netdev
[-- Attachment #1: Type: text/plain, Size: 597 bytes --]
On Sun, 2007-09-02 at 18:05 +0200, Christian Kujau wrote:
> but given the amount of changes currently
> going into net/ I thought this might be interesting:
>
> [15604.137408] RTNL: assertion failed at net/core/dev.c (2595)
> [15604.138807] [<c038c612>] __dev_set_promiscuity+0xc2/0xd0
> [15604.139163] [<c038c9bb>] dev_set_promiscuity+0x1b/0x40
> [15604.139515] [<f91cb3fb>] VNetBridgeStartPromisc+0x2b/0x50 [vmnet]
Not sure why this would be interesting. Clearly, dev_set_promiscuity is
called without the RTNL held while it should be. And see who the caller
is?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* RTNL: assertion failed at net/core/dev.c
@ 2024-10-22 8:24 Dmitry Antipov
2024-10-22 16:27 ` Joe Damato
2024-10-22 19:56 ` Joe Damato
0 siblings, 2 replies; 9+ messages in thread
From: Dmitry Antipov @ 2024-10-22 8:24 UTC (permalink / raw)
To: Joe Damato; +Cc: Simon Horman, Tony Nguyen, netdev@vger.kernel.org
Hello,
running around https://syzkaller.appspot.com/bug?extid=b390c8062d8387b6272a
with net-next and linux-next, I've noticed the following:
# reboot -f
...
[ 16.324520][ T5121] ------------[ cut here ]------------
[ 16.324750][ T5121] RTNL: assertion failed at net/core/dev.c (6627)
[ 16.325133][ T5121] WARNING: CPU: 0 PID: 5121 at net/core/dev.c:6627 netif_queue_set_napi+0x25b/0x2e0
[ 16.325530][ T5121] Modules linked in:
[ 16.325697][ T5121] CPU: 0 UID: 0 PID: 5121 Comm: reboot Not tainted 6.12.0-rc4-00051-g5d4382aa0e93 #4
[ 16.326085][ T5121] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014
[ 16.326470][ T5121] RIP: 0010:netif_queue_set_napi+0x25b/0x2e0
[ 16.326725][ T5121] Code: 62 fe ff ff e8 96 a2 e1 f8 c6 05 37 47 7e 07 01 90 ba e3 19 00 00 48 c7 c6 c0 f5 7a 8c 48 c7 c7 00 f6 7a 8c e8 76 85 a4 f8 90 <0f> 0b 90 90 e9 33 fe ff ff e8 67 a2 e1 f8
90 0f 0b 90 e8 5e a2 e1
[ 16.327487][ T5121] RSP: 0018:ffffc9000320fb58 EFLAGS: 00010282
[ 16.327737][ T5121] RAX: 0000000000000000 RBX: ffff888107a48000 RCX: 0000000000000000
[ 16.328169][ T5121] RDX: 0000000000000000 RSI: ffffffff8abe03c6 RDI: 0000000000000001
[ 16.328483][ T5121] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
[ 16.328794][ T5121] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[ 16.329128][ T5121] R13: 0000000000000000 R14: 0000000000000000 R15: ffff888105b04940
[ 16.329517][ T5121] FS: 00007efd0d0c7380(0000) GS:ffff888062800000(0000) knlGS:0000000000000000
[ 16.329877][ T5121] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 16.330148][ T5121] CR2: 00007efd0d3af8c0 CR3: 000000002460a000 CR4: 00000000000006f0
[ 16.330467][ T5121] Call Trace:
[ 16.330601][ T5121] <TASK>
[ 16.330723][ T5121] ? __warn.cold+0x163/0x2ef
[ 16.330933][ T5121] ? netif_queue_set_napi+0x25b/0x2e0
[ 16.331157][ T5121] ? report_bug+0x28f/0x490
[ 16.331349][ T5121] ? handle_bug+0x54/0x90
[ 16.331527][ T5121] ? exc_invalid_op+0x17/0x50
[ 16.331719][ T5121] ? asm_exc_invalid_op+0x1a/0x20
[ 16.331928][ T5121] ? __warn_printk.cold+0x146/0x1a0
[ 16.332144][ T5121] ? netif_queue_set_napi+0x25b/0x2e0
[ 16.332364][ T5121] ? netif_queue_set_napi+0x25a/0x2e0
[ 16.332583][ T5121] e1000_down+0x2be/0x6b0
[ 16.332767][ T5121] __e1000_shutdown.isra.0+0x1d6/0x7f0
[ 16.332995][ T5121] e1000_shutdown+0x6d/0x110
[ 16.333191][ T5121] ? __pfx_e1000_shutdown+0x10/0x10
[ 16.333405][ T5121] ? lockdep_hardirqs_on+0x7b/0x110
[ 16.333618][ T5121] ? _raw_spin_unlock_irqrestore+0x3b/0x80
[ 16.333854][ T5121] ? __pm_runtime_resume+0xc3/0x170
[ 16.334072][ T5121] ? __pfx_e1000_shutdown+0x10/0x10
[ 16.334323][ T5121] pci_device_shutdown+0x83/0x160
[ 16.334539][ T5121] device_shutdown+0x3ba/0x5c0
[ 16.334738][ T5121] ? __pfx_pci_device_shutdown+0x10/0x10
[ 16.334979][ T5121] kernel_restart+0x64/0xa0
[ 16.335170][ T5121] __do_sys_reboot+0x29a/0x400
[ 16.335369][ T5121] ? __pfx___do_sys_reboot+0x10/0x10
[ 16.335582][ T5121] ? lock_acquire+0x2f/0xb0
[ 16.335772][ T5121] ? __pfx_ksys_sync+0x10/0x10
[ 16.335975][ T5121] do_syscall_64+0xc7/0x250
[ 16.336166][ T5121] entry_SYSCALL_64_after_hwframe+0x77/0x7f
[ 16.336408][ T5121] RIP: 0033:0x7efd0d2208b4
[ 16.336589][ T5121] Code: f0 ff ff 73 01 c3 48 8b 0d 71 55 0d 00 f7 d8 64 89 01 48 83 c8 ff c3 89 fa be 69 19 12 28 bf ad de e1 fe b8 a9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 45 55 0d
00 f7 d8 64 89 02 48 83
[ 16.337336][ T5121] RSP: 002b:00007ffd84212378 EFLAGS: 00000202 ORIG_RAX: 00000000000000a9
[ 16.337663][ T5121] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007efd0d2208b4
[ 16.337971][ T5121] RDX: 0000000001234567 RSI: 0000000028121969 RDI: 00000000fee1dead
[ 16.338381][ T5121] RBP: 0000000000000004 R08: 0000000000000001 R09: 00007efd0d3af8ca
[ 16.338690][ T5121] R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffd842124c8
[ 16.339003][ T5121] R13: 00007ffd842124e0 R14: 0000558687946169 R15: 00007efd0d3fea80
[ 16.339322][ T5121] </TASK>
[ 16.339448][ T5121] Kernel panic - not syncing: kernel: panic_on_warn set ...
[ 16.339729][ T5121] CPU: 0 UID: 0 PID: 5121 Comm: reboot Not tainted 6.12.0-rc4-00051-g5d4382aa0e93 #4
[ 16.340092][ T5121] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014
[ 16.340458][ T5121] Call Trace:
[ 16.340590][ T5121] <TASK>
[ 16.340709][ T5121] dump_stack_lvl+0x100/0x190
[ 16.340898][ T5121] panic+0x314/0x6da
[ 16.341061][ T5121] ? __pfx_panic+0x10/0x10
[ 16.341242][ T5121] ? show_trace_log_lvl+0x1ac/0x300
[ 16.341454][ T5121] ? check_panic_on_warn+0x1f/0x90
[ 16.341664][ T5121] check_panic_on_warn.cold+0x19/0x34
[ 16.341879][ T5121] ? netif_queue_set_napi+0x25b/0x2e0
[ 16.342098][ T5121] __warn.cold+0x16f/0x2ef
[ 16.342278][ T5121] ? netif_queue_set_napi+0x25b/0x2e0
[ 16.342491][ T5121] report_bug+0x28f/0x490
[ 16.342665][ T5121] handle_bug+0x54/0x90
[ 16.342831][ T5121] exc_invalid_op+0x17/0x50
[ 16.343017][ T5121] asm_exc_invalid_op+0x1a/0x20
[ 16.343265][ T5121] RIP: 0010:netif_queue_set_napi+0x25b/0x2e0
[ 16.343508][ T5121] Code: 62 fe ff ff e8 96 a2 e1 f8 c6 05 37 47 7e 07 01 90 ba e3 19 00 00 48 c7 c6 c0 f5 7a 8c 48 c7 c7 00 f6 7a 8c e8 76 85 a4 f8 90 <0f> 0b 90 90 e9 33 fe ff ff e8 67 a2 e1 f8
90 0f 0b 90 e8 5e a2 e1
[ 16.344252][ T5121] RSP: 0018:ffffc9000320fb58 EFLAGS: 00010282
[ 16.344493][ T5121] RAX: 0000000000000000 RBX: ffff888107a48000 RCX: 0000000000000000
[ 16.344798][ T5121] RDX: 0000000000000000 RSI: ffffffff8abe03c6 RDI: 0000000000000001
[ 16.345109][ T5121] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
[ 16.345420][ T5121] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[ 16.345734][ T5121] R13: 0000000000000000 R14: 0000000000000000 R15: ffff888105b04940
[ 16.346115][ T5121] ? __warn_printk.cold+0x146/0x1a0
[ 16.346328][ T5121] ? netif_queue_set_napi+0x25a/0x2e0
[ 16.346547][ T5121] e1000_down+0x2be/0x6b0
[ 16.346722][ T5121] __e1000_shutdown.isra.0+0x1d6/0x7f0
[ 16.346943][ T5121] e1000_shutdown+0x6d/0x110
[ 16.347133][ T5121] ? __pfx_e1000_shutdown+0x10/0x10
[ 16.347345][ T5121] ? lockdep_hardirqs_on+0x7b/0x110
[ 16.347570][ T5121] ? _raw_spin_unlock_irqrestore+0x3b/0x80
[ 16.347806][ T5121] ? __pm_runtime_resume+0xc3/0x170
[ 16.348119][ T5121] ? __pfx_e1000_shutdown+0x10/0x10
[ 16.348335][ T5121] pci_device_shutdown+0x83/0x160
[ 16.348542][ T5121] device_shutdown+0x3ba/0x5c0
[ 16.348738][ T5121] ? __pfx_pci_device_shutdown+0x10/0x10
[ 16.348970][ T5121] kernel_restart+0x64/0xa0
[ 16.349159][ T5121] __do_sys_reboot+0x29a/0x400
[ 16.349355][ T5121] ? __pfx___do_sys_reboot+0x10/0x10
[ 16.349573][ T5121] ? lock_acquire+0x2f/0xb0
[ 16.349760][ T5121] ? __pfx_ksys_sync+0x10/0x10
[ 16.349960][ T5121] do_syscall_64+0xc7/0x250
[ 16.350148][ T5121] entry_SYSCALL_64_after_hwframe+0x77/0x7f
[ 16.350388][ T5121] RIP: 0033:0x7efd0d2208b4
[ 16.350568][ T5121] Code: f0 ff ff 73 01 c3 48 8b 0d 71 55 0d 00 f7 d8 64 89 01 48 83 c8 ff c3 89 fa be 69 19 12 28 bf ad de e1 fe b8 a9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 45 55 0d
00 f7 d8 64 89 02 48 83
[ 16.351318][ T5121] RSP: 002b:00007ffd84212378 EFLAGS: 00000202 ORIG_RAX: 00000000000000a9
[ 16.351649][ T5121] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007efd0d2208b4
[ 16.351962][ T5121] RDX: 0000000001234567 RSI: 0000000028121969 RDI: 00000000fee1dead
[ 16.352274][ T5121] RBP: 0000000000000004 R08: 0000000000000001 R09: 00007efd0d3af8ca
[ 16.352587][ T5121] R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffd842124c8
[ 16.352897][ T5121] R13: 00007ffd842124e0 R14: 0000558687946169 R15: 00007efd0d3fea80
[ 16.353215][ T5121] </TASK>
[ 16.353721][ T5121] Kernel Offset: disabled
[ 16.353907][ T5121] Rebooting in 86400 seconds..
Fast manual bisection makes me think that this was introduced with
8f7ff18a5ec7 ("e1000: Link NAPI instances to queues and IRQs"), so
please look at this patch once again.
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: RTNL: assertion failed at net/core/dev.c
2024-10-22 8:24 Dmitry Antipov
@ 2024-10-22 16:27 ` Joe Damato
2024-10-22 16:29 ` Joe Damato
2024-10-22 19:56 ` Joe Damato
1 sibling, 1 reply; 9+ messages in thread
From: Joe Damato @ 2024-10-22 16:27 UTC (permalink / raw)
To: Dmitry Antipov; +Cc: Simon Horman, Tony Nguyen, netdev@vger.kernel.org
On Tue, Oct 22, 2024 at 11:24:45AM +0300, Dmitry Antipov wrote:
> Hello,
>
> running around https://syzkaller.appspot.com/bug?extid=b390c8062d8387b6272a
> with net-next and linux-next, I've noticed the following:
>
> # reboot -f
> ...
> [ 16.324520][ T5121] ------------[ cut here ]------------
> [ 16.324750][ T5121] RTNL: assertion failed at net/core/dev.c (6627)
> [ 16.325133][ T5121] WARNING: CPU: 0 PID: 5121 at net/core/dev.c:6627 netif_queue_set_napi+0x25b/0x2e0
> [ 16.325530][ T5121] Modules linked in:
> [ 16.325697][ T5121] CPU: 0 UID: 0 PID: 5121 Comm: reboot Not tainted 6.12.0-rc4-00051-g5d4382aa0e93 #4
> [ 16.326085][ T5121] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014
> [ 16.326470][ T5121] RIP: 0010:netif_queue_set_napi+0x25b/0x2e0
> [ 16.326725][ T5121] Code: 62 fe ff ff e8 96 a2 e1 f8 c6 05 37 47 7e 07 01
> 90 ba e3 19 00 00 48 c7 c6 c0 f5 7a 8c 48 c7 c7 00 f6 7a 8c e8 76 85 a4 f8
> 90 <0f> 0b 90 90 e9 33 fe ff ff e8 67 a2 e1 f8 90 0f 0b 90 e8 5e a2 e1
> [ 16.327487][ T5121] RSP: 0018:ffffc9000320fb58 EFLAGS: 00010282
> [ 16.327737][ T5121] RAX: 0000000000000000 RBX: ffff888107a48000 RCX: 0000000000000000
> [ 16.328169][ T5121] RDX: 0000000000000000 RSI: ffffffff8abe03c6 RDI: 0000000000000001
> [ 16.328483][ T5121] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
> [ 16.328794][ T5121] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
> [ 16.329128][ T5121] R13: 0000000000000000 R14: 0000000000000000 R15: ffff888105b04940
> [ 16.329517][ T5121] FS: 00007efd0d0c7380(0000) GS:ffff888062800000(0000) knlGS:0000000000000000
> [ 16.329877][ T5121] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [ 16.330148][ T5121] CR2: 00007efd0d3af8c0 CR3: 000000002460a000 CR4: 00000000000006f0
> [ 16.330467][ T5121] Call Trace:
> [ 16.330601][ T5121] <TASK>
> [ 16.330723][ T5121] ? __warn.cold+0x163/0x2ef
> [ 16.330933][ T5121] ? netif_queue_set_napi+0x25b/0x2e0
> [ 16.331157][ T5121] ? report_bug+0x28f/0x490
> [ 16.331349][ T5121] ? handle_bug+0x54/0x90
> [ 16.331527][ T5121] ? exc_invalid_op+0x17/0x50
> [ 16.331719][ T5121] ? asm_exc_invalid_op+0x1a/0x20
> [ 16.331928][ T5121] ? __warn_printk.cold+0x146/0x1a0
> [ 16.332144][ T5121] ? netif_queue_set_napi+0x25b/0x2e0
> [ 16.332364][ T5121] ? netif_queue_set_napi+0x25a/0x2e0
> [ 16.332583][ T5121] e1000_down+0x2be/0x6b0
> [ 16.332767][ T5121] __e1000_shutdown.isra.0+0x1d6/0x7f0
> [ 16.332995][ T5121] e1000_shutdown+0x6d/0x110
> [ 16.333191][ T5121] ? __pfx_e1000_shutdown+0x10/0x10
> [ 16.333405][ T5121] ? lockdep_hardirqs_on+0x7b/0x110
> [ 16.333618][ T5121] ? _raw_spin_unlock_irqrestore+0x3b/0x80
> [ 16.333854][ T5121] ? __pm_runtime_resume+0xc3/0x170
> [ 16.334072][ T5121] ? __pfx_e1000_shutdown+0x10/0x10
> [ 16.334323][ T5121] pci_device_shutdown+0x83/0x160
> [ 16.334539][ T5121] device_shutdown+0x3ba/0x5c0
> [ 16.334738][ T5121] ? __pfx_pci_device_shutdown+0x10/0x10
> [ 16.334979][ T5121] kernel_restart+0x64/0xa0
> [ 16.335170][ T5121] __do_sys_reboot+0x29a/0x400
> [ 16.335369][ T5121] ? __pfx___do_sys_reboot+0x10/0x10
> [ 16.335582][ T5121] ? lock_acquire+0x2f/0xb0
> [ 16.335772][ T5121] ? __pfx_ksys_sync+0x10/0x10
> [ 16.335975][ T5121] do_syscall_64+0xc7/0x250
> [ 16.336166][ T5121] entry_SYSCALL_64_after_hwframe+0x77/0x7f
> [ 16.336408][ T5121] RIP: 0033:0x7efd0d2208b4
> [ 16.336589][ T5121] Code: f0 ff ff 73 01 c3 48 8b 0d 71 55 0d 00 f7 d8 64
> 89 01 48 83 c8 ff c3 89 fa be 69 19 12 28 bf ad de e1 fe b8 a9 00 00 00 0f
> 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 45 55 0d 00 f7 d8 64 89 02 48 83
> [ 16.337336][ T5121] RSP: 002b:00007ffd84212378 EFLAGS: 00000202 ORIG_RAX: 00000000000000a9
> [ 16.337663][ T5121] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007efd0d2208b4
> [ 16.337971][ T5121] RDX: 0000000001234567 RSI: 0000000028121969 RDI: 00000000fee1dead
> [ 16.338381][ T5121] RBP: 0000000000000004 R08: 0000000000000001 R09: 00007efd0d3af8ca
> [ 16.338690][ T5121] R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffd842124c8
> [ 16.339003][ T5121] R13: 00007ffd842124e0 R14: 0000558687946169 R15: 00007efd0d3fea80
> [ 16.339322][ T5121] </TASK>
> [ 16.339448][ T5121] Kernel panic - not syncing: kernel: panic_on_warn set ...
> [ 16.339729][ T5121] CPU: 0 UID: 0 PID: 5121 Comm: reboot Not tainted 6.12.0-rc4-00051-g5d4382aa0e93 #4
> [ 16.340092][ T5121] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014
> [ 16.340458][ T5121] Call Trace:
> [ 16.340590][ T5121] <TASK>
> [ 16.340709][ T5121] dump_stack_lvl+0x100/0x190
> [ 16.340898][ T5121] panic+0x314/0x6da
> [ 16.341061][ T5121] ? __pfx_panic+0x10/0x10
> [ 16.341242][ T5121] ? show_trace_log_lvl+0x1ac/0x300
> [ 16.341454][ T5121] ? check_panic_on_warn+0x1f/0x90
> [ 16.341664][ T5121] check_panic_on_warn.cold+0x19/0x34
> [ 16.341879][ T5121] ? netif_queue_set_napi+0x25b/0x2e0
> [ 16.342098][ T5121] __warn.cold+0x16f/0x2ef
> [ 16.342278][ T5121] ? netif_queue_set_napi+0x25b/0x2e0
> [ 16.342491][ T5121] report_bug+0x28f/0x490
> [ 16.342665][ T5121] handle_bug+0x54/0x90
> [ 16.342831][ T5121] exc_invalid_op+0x17/0x50
> [ 16.343017][ T5121] asm_exc_invalid_op+0x1a/0x20
> [ 16.343265][ T5121] RIP: 0010:netif_queue_set_napi+0x25b/0x2e0
> [ 16.343508][ T5121] Code: 62 fe ff ff e8 96 a2 e1 f8 c6 05 37 47 7e 07 01
> 90 ba e3 19 00 00 48 c7 c6 c0 f5 7a 8c 48 c7 c7 00 f6 7a 8c e8 76 85 a4 f8
> 90 <0f> 0b 90 90 e9 33 fe ff ff e8 67 a2 e1 f8 90 0f 0b 90 e8 5e a2 e1
> [ 16.344252][ T5121] RSP: 0018:ffffc9000320fb58 EFLAGS: 00010282
> [ 16.344493][ T5121] RAX: 0000000000000000 RBX: ffff888107a48000 RCX: 0000000000000000
> [ 16.344798][ T5121] RDX: 0000000000000000 RSI: ffffffff8abe03c6 RDI: 0000000000000001
> [ 16.345109][ T5121] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
> [ 16.345420][ T5121] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
> [ 16.345734][ T5121] R13: 0000000000000000 R14: 0000000000000000 R15: ffff888105b04940
> [ 16.346115][ T5121] ? __warn_printk.cold+0x146/0x1a0
> [ 16.346328][ T5121] ? netif_queue_set_napi+0x25a/0x2e0
> [ 16.346547][ T5121] e1000_down+0x2be/0x6b0
> [ 16.346722][ T5121] __e1000_shutdown.isra.0+0x1d6/0x7f0
> [ 16.346943][ T5121] e1000_shutdown+0x6d/0x110
> [ 16.347133][ T5121] ? __pfx_e1000_shutdown+0x10/0x10
> [ 16.347345][ T5121] ? lockdep_hardirqs_on+0x7b/0x110
> [ 16.347570][ T5121] ? _raw_spin_unlock_irqrestore+0x3b/0x80
> [ 16.347806][ T5121] ? __pm_runtime_resume+0xc3/0x170
> [ 16.348119][ T5121] ? __pfx_e1000_shutdown+0x10/0x10
> [ 16.348335][ T5121] pci_device_shutdown+0x83/0x160
> [ 16.348542][ T5121] device_shutdown+0x3ba/0x5c0
> [ 16.348738][ T5121] ? __pfx_pci_device_shutdown+0x10/0x10
> [ 16.348970][ T5121] kernel_restart+0x64/0xa0
> [ 16.349159][ T5121] __do_sys_reboot+0x29a/0x400
> [ 16.349355][ T5121] ? __pfx___do_sys_reboot+0x10/0x10
> [ 16.349573][ T5121] ? lock_acquire+0x2f/0xb0
> [ 16.349760][ T5121] ? __pfx_ksys_sync+0x10/0x10
> [ 16.349960][ T5121] do_syscall_64+0xc7/0x250
> [ 16.350148][ T5121] entry_SYSCALL_64_after_hwframe+0x77/0x7f
> [ 16.350388][ T5121] RIP: 0033:0x7efd0d2208b4
> [ 16.350568][ T5121] Code: f0 ff ff 73 01 c3 48 8b 0d 71 55 0d 00 f7 d8 64
> 89 01 48 83 c8 ff c3 89 fa be 69 19 12 28 bf ad de e1 fe b8 a9 00 00 00 0f
> 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 45 55 0d 00 f7 d8 64 89 02 48 83
> [ 16.351318][ T5121] RSP: 002b:00007ffd84212378 EFLAGS: 00000202 ORIG_RAX: 00000000000000a9
> [ 16.351649][ T5121] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007efd0d2208b4
> [ 16.351962][ T5121] RDX: 0000000001234567 RSI: 0000000028121969 RDI: 00000000fee1dead
> [ 16.352274][ T5121] RBP: 0000000000000004 R08: 0000000000000001 R09: 00007efd0d3af8ca
> [ 16.352587][ T5121] R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffd842124c8
> [ 16.352897][ T5121] R13: 00007ffd842124e0 R14: 0000558687946169 R15: 00007efd0d3fea80
> [ 16.353215][ T5121] </TASK>
> [ 16.353721][ T5121] Kernel Offset: disabled
> [ 16.353907][ T5121] Rebooting in 86400 seconds..
>
> Fast manual bisection makes me think that this was introduced with
> 8f7ff18a5ec7 ("e1000: Link NAPI instances to queues and IRQs"), so
> please look at this patch once again.
Thanks for reporting this.
The issue is that in the path highlighted above, rtnl is not held
before e1000_down is called.
I believe this will fix the issue you are seeing, but I am not sure
if a similar change needs to be added for power management's suspend
(which also eventually calls e1000_down):
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 4de9b156b2be..ebbd3fa3a5c8 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -5074,7 +5074,9 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake)
usleep_range(10000, 20000);
WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags));
+ rtnl_lock()
e1000_down(adapter);
+ rtnl_unlock();
}
status = er32(STATUS);
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: RTNL: assertion failed at net/core/dev.c
2024-10-22 16:27 ` Joe Damato
@ 2024-10-22 16:29 ` Joe Damato
0 siblings, 0 replies; 9+ messages in thread
From: Joe Damato @ 2024-10-22 16:29 UTC (permalink / raw)
To: Dmitry Antipov, Simon Horman, Tony Nguyen, netdev@vger.kernel.org
On Tue, Oct 22, 2024 at 09:27:03AM -0700, Joe Damato wrote:
> On Tue, Oct 22, 2024 at 11:24:45AM +0300, Dmitry Antipov wrote:
> > Hello,
> >
> > running around https://syzkaller.appspot.com/bug?extid=b390c8062d8387b6272a
> > with net-next and linux-next, I've noticed the following:
[...]
>
> Thanks for reporting this.
>
> The issue is that in the path highlighted above, rtnl is not held
> before e1000_down is called.
>
> I believe this will fix the issue you are seeing, but I am not sure
> if a similar change needs to be added for power management's suspend
> (which also eventually calls e1000_down):
>
> diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
> index 4de9b156b2be..ebbd3fa3a5c8 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
> @@ -5074,7 +5074,9 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake)
> usleep_range(10000, 20000);
>
> WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags));
> + rtnl_lock()
As you can see, I didn't compile test this as I'm missing a
semicolon (sorry).
I am still reading through the source to see what other spots may
need rtnl_lock.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: RTNL: assertion failed at net/core/dev.c
2024-10-22 8:24 Dmitry Antipov
2024-10-22 16:27 ` Joe Damato
@ 2024-10-22 19:56 ` Joe Damato
2024-10-23 8:18 ` Dmitry Antipov
1 sibling, 1 reply; 9+ messages in thread
From: Joe Damato @ 2024-10-22 19:56 UTC (permalink / raw)
To: Dmitry Antipov; +Cc: Simon Horman, Tony Nguyen, netdev@vger.kernel.org
On Tue, Oct 22, 2024 at 11:24:45AM +0300, Dmitry Antipov wrote:
> Hello,
>
> running around https://syzkaller.appspot.com/bug?extid=b390c8062d8387b6272a
> with net-next and linux-next, I've noticed the following:
>
> # reboot -f
I wasn't able to repro this myself with e1000, but if you have the
time and desire to test a fix, the patch I sent here:
https://lore.kernel.org/netdev/20241022172153.217890-1-jdamato@fastly.com/T/#u
Intends to fix the bug you hit. If you do test this patch and it
works for you, please let me know.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: RTNL: assertion failed at net/core/dev.c
2024-10-22 19:56 ` Joe Damato
@ 2024-10-23 8:18 ` Dmitry Antipov
0 siblings, 0 replies; 9+ messages in thread
From: Dmitry Antipov @ 2024-10-23 8:18 UTC (permalink / raw)
To: Joe Damato, Simon Horman, Tony Nguyen; +Cc: netdev@vger.kernel.org
On 10/22/24 10:56 PM, Joe Damato wrote:
> Intends to fix the bug you hit. If you do test this patch and it
> works for you, please let me know.
Well, the following patch (over net-next at least) fixes the reboot issue for me:
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 4de9b156b2be..1cae92f136e5 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -3509,7 +3509,9 @@ static void e1000_reset_task(struct work_struct *work)
container_of(work, struct e1000_adapter, reset_task);
e_err(drv, "Reset adapter\n");
+ rtnl_lock();
e1000_reinit_locked(adapter);
+ rtnl_unlock();
}
/**
@@ -5074,7 +5076,9 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake)
usleep_range(10000, 20000);
WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags));
+ rtnl_lock();
e1000_down(adapter);
+ rtnl_unlock();
}
status = er32(STATUS);
@@ -5240,8 +5244,11 @@ static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev,
if (state == pci_channel_io_perm_failure)
return PCI_ERS_RESULT_DISCONNECT;
- if (netif_running(netdev))
+ if (netif_running(netdev)) {
+ rtnl_lock();
e1000_down(adapter);
+ rtnl_unlock();
+ }
if (!test_and_set_bit(__E1000_DISABLED, &adapter->flags))
pci_disable_device(pdev);
OTOH I would refrain from Tested-by: just because I'm running an emulated environment
generated by syzbot, and this thing is definitely better to be tested by more people
with real e1000 hardware.
Thanks,
Dmitry
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-10-23 8:24 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-02 16:05 RTNL: assertion failed at net/core/dev.c Christian Kujau
2007-09-02 16:13 ` Stephen Hemminger
2007-09-02 18:04 ` Christian Kujau
2007-09-02 16:13 ` Johannes Berg
-- strict thread matches above, loose matches on Subject: below --
2024-10-22 8:24 Dmitry Antipov
2024-10-22 16:27 ` Joe Damato
2024-10-22 16:29 ` Joe Damato
2024-10-22 19:56 ` Joe Damato
2024-10-23 8:18 ` Dmitry Antipov
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).