====================================== | [ 14.617331][ T227] #6: ffffffff909e3948 (rtnl_mutex){+.+.}-{4:4}, at: nsim_destroy (drivers/net/netdevsim/netdev.c:826) netdevsim | [ 14.617686][ T227] #7: ffffffff909d25f0 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain (kernel/notifier.c:380 kernel/notifier.c:368) | [ 14.618090][ T227] | [ 14.618090][ T227] stack backtrace: [ 14.618675][ T227] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 14.618914][ T227] Call Trace: [ 14.619056][ T227] [ 14.619169][ T227] dump_stack_lvl (lib/dump_stack.c:123) [ 14.619367][ T227] print_deadlock_bug (kernel/locking/lockdep.c:3040) [ 14.619563][ T227] validate_chain (kernel/locking/lockdep.c:3894) [ 14.619755][ T227] ? find_held_lock (kernel/locking/lockdep.c:5339) [ 14.619947][ T227] ? __pfx_validate_chain (kernel/locking/lockdep.c:3860) [ 14.620146][ T227] ? hlock_class (./arch/x86/include/asm/bitops.h:227 ./arch/x86/include/asm/bitops.h:239 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 kernel/locking/lockdep.c:228) [ 14.620333][ T227] ? mark_lock (kernel/locking/lockdep.c:4727 (discriminator 3)) [ 14.620478][ T227] __lock_acquire (kernel/locking/lockdep.c:5226) [ 14.620668][ T227] ? usage_match (kernel/locking/lockdep.c:2277) [ 14.620862][ T227] lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5851) [ 14.621054][ T227] ? blocking_notifier_call_chain (kernel/notifier.c:380 kernel/notifier.c:368) [ 14.621301][ T227] ? __pfx_check_irq_usage (kernel/locking/lockdep.c:2813) [ 14.621492][ T227] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5814) [ 14.621788][ T227] ? trace_lock_acquire (./include/trace/events/lock.h:24 (discriminator 37)) [ 14.621976][ T227] ? lock_acquire (kernel/locking/lockdep.c:5822) [ 14.622189][ T227] ? blocking_notifier_call_chain (kernel/notifier.c:380 kernel/notifier.c:368) [ 14.622424][ T227] down_read (./arch/x86/include/asm/preempt.h:79 kernel/locking/rwsem.c:1246 kernel/locking/rwsem.c:1261 kernel/locking/rwsem.c:1526) [ 14.622680][ T227] ? blocking_notifier_call_chain (kernel/notifier.c:380 kernel/notifier.c:368) [ 14.622918][ T227] ? __pfx_down_read (kernel/locking/rwsem.c:1522) [ 14.623127][ T227] ? notifier_call_chain (kernel/notifier.c:85 (discriminator 2)) [ 14.623320][ T227] blocking_notifier_call_chain (kernel/notifier.c:380 kernel/notifier.c:368) [ 14.623615][ T227] __netdev_upper_dev_unlink (net/core/dev.c:8000 (discriminator 11) net/core/dev.c:8017 (discriminator 11) net/core/dev.c:8167 (discriminator 11)) [ 14.623806][ T227] ? __pfx___netdev_upper_dev_unlink (net/core/dev.c:8151) [ 14.624042][ T227] ? lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5851) [ 14.624272][ T227] ? mutex_is_locked (./arch/x86/include/asm/atomic64_64.h:15 ./include/linux/atomic/atomic-arch-fallback.h:2583 ./include/linux/atomic/atomic-long.h:38 ./include/linux/atomic/atomic-instrumented.h:3189 kernel/locking/mutex.h:47 kernel/locking/mutex.c:66) [ 14.624453][ T227] ? rtnl_is_locked (net/core/rtnetlink.c:163) [ 14.624630][ T227] netdev_upper_dev_unlink (net/core/dev.c:8190) [ 14.624805][ T227] ? __pfx_netdev_upper_dev_unlink (net/core/dev.c:8190) [ 14.625142][ T227] ? macsec_del_dev (drivers/net/macsec.c:4005 (discriminator 1)) macsec [ 14.625326][ T227] macsec_common_dellink (drivers/net/macsec.c:4036) macsec [ 14.625566][ T227] ? __pfx_macsec_common_dellink (drivers/net/macsec.c:4015) macsec [ 14.625807][ T227] ? __mutex_unlock_slowpath (./arch/x86/include/asm/atomic64_64.h:101 ./include/linux/atomic/atomic-arch-fallback.h:4329 ./include/linux/atomic/atomic-long.h:1506 ./include/linux/atomic/atomic-instrumented.h:4481 kernel/locking/mutex.c:913) [ 14.626108][ T227] macsec_notify (drivers/net/macsec.c:4479 (discriminator 3)) macsec [ 14.626318][ T227] ? __pfx_macsec_notify (drivers/net/macsec.c:4457) macsec [ 14.626554][ T227] ? packet_notifier (net/packet/af_packet.c:4282) [ 14.626744][ T227] notifier_call_chain (kernel/notifier.c:85 (discriminator 2)) [ 14.627037][ T227] blocking_notifier_call_chain (kernel/notifier.c:381 kernel/notifier.c:368) [ 14.627227][ T227] unregister_netdevice_many_notify (net/core/dev.c:11575) [ 14.627468][ T227] ? __mutex_trylock_common (./arch/x86/include/asm/atomic64_64.h:101 ./include/linux/atomic/atomic-arch-fallback.h:4296 ./include/linux/atomic/atomic-long.h:1482 ./include/linux/atomic/atomic-instrumented.h:4458 kernel/locking/mutex.c:104) [ 14.627769][ T227] ? __pfx___mutex_trylock_common (kernel/locking/mutex.c:79) [ 14.627990][ T227] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11516) [ 14.628209][ T227] ? lock_acquire (kernel/locking/lockdep.c:5822) [ 14.628393][ T227] ? __mutex_lock (./arch/x86/include/asm/preempt.h:94 kernel/locking/mutex.c:595 kernel/locking/mutex.c:735) [ 14.628683][ T227] ? nsim_destroy (drivers/net/netdevsim/netdev.c:826) netdevsim [ 14.628881][ T227] ? __pfx___mutex_lock (kernel/locking/mutex.c:734) [ 14.629068][ T227] unregister_netdevice_queue (net/core/dev.c:11511) [ 14.629244][ T227] ? __pfx_do_raw_spin_lock (kernel/locking/spinlock_debug.c:114) [ 14.629426][ T227] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11500) [ 14.629650][ T227] nsim_destroy (drivers/net/netdevsim/netdev.c:831 (discriminator 2)) netdevsim [ 14.629840][ T227] __nsim_dev_port_del (drivers/net/netdevsim/dev.c:426 drivers/net/netdevsim/dev.c:1429) netdevsim [ 14.630209][ T227] nsim_dev_reload_destroy (drivers/net/netdevsim/dev.c:1438 drivers/net/netdevsim/dev.c:1661) netdevsim [ 14.630444][ T227] nsim_drv_remove (drivers/net/netdevsim/dev.c:1678) netdevsim [ 14.630631][ T227] device_release_driver_internal (drivers/base/dd.c:1275 drivers/base/dd.c:1296) [ 14.630856][ T227] ? klist_put (lib/klist.c:220) [ 14.631095][ T227] bus_remove_device (./include/linux/kobject.h:193 drivers/base/base.h:73 drivers/base/bus.c:583) [ 14.631268][ T227] device_del (drivers/base/core.c:3855) [ 14.631407][ T227] ? __pfx_device_del (drivers/base/core.c:3809) [ 14.631586][ T227] ? lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5851) [ 14.631866][ T227] ? kernfs_fop_write_iter (fs/kernfs/file.c:326) [ 14.632045][ T227] device_unregister (drivers/base/core.c:3772 drivers/base/core.c:3896) [ 14.632228][ T227] del_device_store (drivers/net/netdevsim/bus.c:230) netdevsim [ 14.632461][ T227] ? __pfx_del_device_store (drivers/net/netdevsim/bus.c:197) netdevsim [ 14.632795][ T227] ? __pfx_sysfs_kf_write (fs/sysfs/file.c:132) [ 14.632979][ T227] ? sysfs_file_ops (fs/sysfs/file.c:31 (discriminator 1)) [ 14.633173][ T227] ? __pfx_sysfs_kf_write (fs/sysfs/file.c:132) [ 14.633351][ T227] kernfs_fop_write_iter (fs/kernfs/file.c:334) [ 14.633638][ T227] vfs_write (fs/read_write.c:586 fs/read_write.c:679) [ 14.633771][ T227] ? __pfx_vfs_write (fs/read_write.c:660) [ 14.633955][ T227] ? find_held_lock (kernel/locking/lockdep.c:5339) [ 14.634158][ T227] ? __pfx___lock_release (kernel/locking/lockdep.c:5501) [ 14.634338][ T227] ksys_write (fs/read_write.c:731) [ 14.634474][ T227] ? __pfx_ksys_write (fs/read_write.c:721) [ 14.634649][ T227] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) [ 14.634831][ T227] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 14.635157][ T227] RIP: 0033:0x7f2b39faeb77 [ 14.635343][ T227] Code: 0b 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24 All code ======== 0: 0b 00 or (%rax),%eax 2: f7 d8 neg %eax 4: 64 89 02 mov %eax,%fs:(%rdx) 7: 48 c7 c0 ff ff ff ff mov $0xffffffffffffffff,%rax e: eb b7 jmp 0xffffffffffffffc7 10: 0f 1f 00 nopl (%rax) 13: f3 0f 1e fa endbr64 17: 64 8b 04 25 18 00 00 mov %fs:0x18,%eax 1e: 00 1f: 85 c0 test %eax,%eax 21: 75 10 jne 0x33 23: b8 01 00 00 00 mov $0x1,%eax 28: 0f 05 syscall 2a:* 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax <-- trapping instruction 30: 77 51 ja 0x83 32: c3 ret 33: 48 83 ec 28 sub $0x28,%rsp 37: 48 89 54 24 18 mov %rdx,0x18(%rsp) 3c: 48 rex.W 3d: 89 .byte 0x89 3e: 74 24 je 0x64 Code starting with the faulting instruction =========================================== 0: 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax 6: 77 51 ja 0x59 8: c3 ret 9: 48 83 ec 28 sub $0x28,%rsp d: 48 89 54 24 18 mov %rdx,0x18(%rsp) 12: 48 rex.W 13: 89 .byte 0x89 14: 74 24 je 0x3a [ 14.636119][ T227] RSP: 002b:00007fff19250d48 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 14.636397][ T227] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f2b39faeb77 [ 14.636659][ T227] RDX: 0000000000000004 RSI: 000056194d62eb80 RDI: 0000000000000001 [ 14.637025][ T227] RBP: 000056194d62eb80 R08: 0000000000000000 R09: 00007f2b3a0214e0 [ 14.637302][ T227] R10: 00007f2b3a0213e0 R11: 0000000000000246 R12: 0000000000000004 Finger prints: print_deadlock_bug:validate_chain:__lock_acquire:down_read:blocking_notifier_call_chain