====================================== | [ 270.893891][ T4192] #6: ffffffffb09e3948 (rtnl_mutex){+.+.}-{4:4}, at: nsim_destroy (drivers/net/netdevsim/netdev.c:826) netdevsim | [ 270.894404][ T4192] #7: ffffffffb09d25f0 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain (kernel/notifier.c:380 kernel/notifier.c:368) | [ 270.894969][ T4192] | [ 270.894969][ T4192] stack backtrace: [ 270.895819][ T4192] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 270.896162][ T4192] Call Trace: [ 270.896372][ T4192] [ 270.896545][ T4192] dump_stack_lvl (lib/dump_stack.c:123) [ 270.896821][ T4192] print_deadlock_bug (kernel/locking/lockdep.c:3040) [ 270.897047][ T4192] validate_chain (kernel/locking/lockdep.c:3894) [ 270.897250][ T4192] ? find_held_lock (kernel/locking/lockdep.c:5339) [ 270.897438][ T4192] ? __pfx_validate_chain (kernel/locking/lockdep.c:3860) [ 270.897651][ T4192] ? 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) [ 270.897928][ T4192] ? mark_lock (kernel/locking/lockdep.c:4727 (discriminator 3)) [ 270.898143][ T4192] __lock_acquire (kernel/locking/lockdep.c:5226) [ 270.898428][ T4192] ? usage_match (kernel/locking/lockdep.c:2277) [ 270.898691][ T4192] lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5851) [ 270.898969][ T4192] ? blocking_notifier_call_chain (kernel/notifier.c:380 kernel/notifier.c:368) [ 270.899323][ T4192] ? __pfx_check_irq_usage (kernel/locking/lockdep.c:2813) [ 270.899606][ T4192] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5814) [ 270.899885][ T4192] ? trace_lock_acquire (./include/trace/events/lock.h:24 (discriminator 37)) [ 270.900162][ T4192] ? lock_acquire (kernel/locking/lockdep.c:5822) [ 270.900452][ T4192] ? blocking_notifier_call_chain (kernel/notifier.c:380 kernel/notifier.c:368) [ 270.900813][ T4192] down_read (./arch/x86/include/asm/preempt.h:79 kernel/locking/rwsem.c:1246 kernel/locking/rwsem.c:1261 kernel/locking/rwsem.c:1526) [ 270.901015][ T4192] ? blocking_notifier_call_chain (kernel/notifier.c:380 kernel/notifier.c:368) [ 270.901276][ T4192] ? __pfx_down_read (kernel/locking/rwsem.c:1522) [ 270.901465][ T4192] ? notifier_call_chain (kernel/notifier.c:85 (discriminator 2)) [ 270.901648][ T4192] blocking_notifier_call_chain (kernel/notifier.c:380 kernel/notifier.c:368) [ 270.901831][ T4192] __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)) [ 270.902019][ T4192] ? __pfx___netdev_upper_dev_unlink (net/core/dev.c:8151) [ 270.902310][ T4192] ? lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5851) [ 270.902497][ T4192] ? 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) [ 270.902682][ T4192] ? rtnl_is_locked (net/core/rtnetlink.c:163) [ 270.902867][ T4192] netdev_upper_dev_unlink (net/core/dev.c:8190) [ 270.903122][ T4192] ? __pfx_netdev_upper_dev_unlink (net/core/dev.c:8190) [ 270.903473][ T4192] ? macsec_del_dev (drivers/net/macsec.c:4005 (discriminator 1)) macsec [ 270.903773][ T4192] macsec_common_dellink (drivers/net/macsec.c:4036) macsec [ 270.904131][ T4192] ? __pfx_macsec_common_dellink (drivers/net/macsec.c:4015) macsec [ 270.904495][ T4192] ? __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) [ 270.904784][ T4192] macsec_notify (drivers/net/macsec.c:4479 (discriminator 3)) macsec [ 270.905078][ T4192] ? __pfx_macsec_notify (drivers/net/macsec.c:4457) macsec [ 270.905437][ T4192] ? packet_notifier (net/packet/af_packet.c:4282) [ 270.905734][ T4192] notifier_call_chain (kernel/notifier.c:85 (discriminator 2)) [ 270.906023][ T4192] blocking_notifier_call_chain (kernel/notifier.c:381 kernel/notifier.c:368) [ 270.906303][ T4192] unregister_netdevice_many_notify (net/core/dev.c:11575) [ 270.906671][ T4192] ? __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) [ 270.906956][ T4192] ? __pfx___mutex_trylock_common (kernel/locking/mutex.c:79) [ 270.907315][ T4192] ? __pfx_unregister_netdevice_many_notify (net/core/dev.c:11516) [ 270.907679][ T4192] ? lock_acquire (kernel/locking/lockdep.c:5822) [ 270.907973][ T4192] ? __mutex_lock (./arch/x86/include/asm/preempt.h:94 kernel/locking/mutex.c:595 kernel/locking/mutex.c:735) [ 270.908253][ T4192] ? nsim_destroy (drivers/net/netdevsim/netdev.c:826) netdevsim [ 270.908556][ T4192] ? __pfx___mutex_lock (kernel/locking/mutex.c:734) [ 270.908847][ T4192] unregister_netdevice_queue (net/core/dev.c:11511) [ 270.909132][ T4192] ? __pfx_do_raw_spin_lock (kernel/locking/spinlock_debug.c:114) [ 270.909419][ T4192] ? __pfx_unregister_netdevice_queue (net/core/dev.c:11500) [ 270.909788][ T4192] nsim_destroy (drivers/net/netdevsim/netdev.c:831 (discriminator 2)) netdevsim [ 270.910092][ T4192] __nsim_dev_port_del (drivers/net/netdevsim/dev.c:426 drivers/net/netdevsim/dev.c:1429) netdevsim [ 270.910462][ T4192] nsim_dev_reload_destroy (drivers/net/netdevsim/dev.c:1438 drivers/net/netdevsim/dev.c:1661) netdevsim [ 270.910843][ T4192] nsim_drv_remove (drivers/net/netdevsim/dev.c:1678) netdevsim [ 270.911146][ T4192] device_release_driver_internal (drivers/base/dd.c:1275 drivers/base/dd.c:1296) [ 270.911510][ T4192] ? klist_put (lib/klist.c:220) [ 270.911728][ T4192] bus_remove_device (./include/linux/kobject.h:193 drivers/base/base.h:73 drivers/base/bus.c:583) [ 270.912025][ T4192] device_del (drivers/base/core.c:3855) [ 270.912246][ T4192] ? __pfx_device_del (drivers/base/core.c:3809) [ 270.912532][ T4192] ? lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5851) [ 270.912818][ T4192] ? kernfs_fop_write_iter (fs/kernfs/file.c:326) [ 270.913108][ T4192] device_unregister (drivers/base/core.c:3772 drivers/base/core.c:3896) [ 270.913395][ T4192] del_device_store (drivers/net/netdevsim/bus.c:230) netdevsim [ 270.913774][ T4192] ? __pfx_del_device_store (drivers/net/netdevsim/bus.c:197) netdevsim [ 270.914156][ T4192] ? __pfx_sysfs_kf_write (fs/sysfs/file.c:132) [ 270.914445][ T4192] ? sysfs_file_ops (fs/sysfs/file.c:31 (discriminator 1)) [ 270.914735][ T4192] ? __pfx_sysfs_kf_write (fs/sysfs/file.c:132) [ 270.915018][ T4192] kernfs_fop_write_iter (fs/kernfs/file.c:334) [ 270.915301][ T4192] vfs_write (fs/read_write.c:586 fs/read_write.c:679) [ 270.915520][ T4192] ? __pfx_vfs_write (fs/read_write.c:660) [ 270.915810][ T4192] ? find_held_lock (kernel/locking/lockdep.c:5339) [ 270.916106][ T4192] ? __pfx___lock_release (kernel/locking/lockdep.c:5501) [ 270.916394][ T4192] ksys_write (fs/read_write.c:731) [ 270.916666][ T4192] ? __pfx_ksys_write (fs/read_write.c:721) [ 270.916880][ T4192] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) [ 270.917086][ T4192] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 270.917339][ T4192] RIP: 0033:0x7f37688eab77 [ 270.917553][ T4192] 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 [ 270.918270][ T4192] RSP: 002b:00007ffe43c93828 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 270.918581][ T4192] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f37688eab77 [ 270.918888][ T4192] RDX: 0000000000000004 RSI: 0000556914b14b80 RDI: 0000000000000001 [ 270.919197][ T4192] RBP: 0000556914b14b80 R08: 0000000000000000 R09: 00007f376895d4e0 [ 270.919501][ T4192] R10: 00007f376895d3e0 R11: 0000000000000246 R12: 0000000000000004 Finger prints: print_deadlock_bug:validate_chain:__lock_acquire:down_read:blocking_notifier_call_chain