====================================== | [ 12.546931][ T252] #6: ffffffff97607e88 (rtnl_mutex){+.+.}-{4:4}, at: nsim_create (drivers/net/netdevsim/netdev.c:686 drivers/net/netdevsim/netdev.c:731 drivers/net/netdevsim/netdev.c:802) netdevsim | [ 12.547247][ T252] #7: ffffffff975f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain (kernel/notifier.c:380 kernel/notifier.c:368) | [ 12.547599][ T252] | [ 12.547599][ T252] stack backtrace: [ 12.548072][ T252] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 12.548275][ T252] Call Trace: [ 12.548402][ T252] [ 12.548487][ T252] dump_stack_lvl (lib/dump_stack.c:123) [ 12.548668][ T252] print_deadlock_bug (kernel/locking/lockdep.c:3040) [ 12.548846][ T252] validate_chain (kernel/locking/lockdep.c:3894) [ 12.549011][ T252] ? __pfx_validate_chain (kernel/locking/lockdep.c:3860) [ 12.549194][ T252] ? 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) [ 12.549358][ T252] ? mark_lock (kernel/locking/lockdep.c:4727 (discriminator 3)) [ 12.549482][ T252] __lock_acquire (kernel/locking/lockdep.c:5226) [ 12.549644][ T252] ? udp_tunnel_nic_netdevice_event (net/ipv4/udp_tunnel_nic.c:909) [ 12.549849][ T252] ? really_probe (drivers/base/dd.c:579 drivers/base/dd.c:658) [ 12.550013][ T252] lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5851) [ 12.550202][ T252] ? blocking_notifier_call_chain (kernel/notifier.c:380 kernel/notifier.c:368) [ 12.550413][ T252] ? entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 12.550624][ T252] ? find_held_lock (kernel/locking/lockdep.c:5339) [ 12.550787][ T252] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5814) [ 12.550963][ T252] ? trace_lock_acquire (./include/trace/events/lock.h:24 (discriminator 37)) [ 12.551125][ T252] ? lock_acquire (kernel/locking/lockdep.c:5822) [ 12.551288][ T252] ? blocking_notifier_call_chain (kernel/notifier.c:380 kernel/notifier.c:368) [ 12.551495][ T252] down_read (./arch/x86/include/asm/preempt.h:79 kernel/locking/rwsem.c:1246 kernel/locking/rwsem.c:1261 kernel/locking/rwsem.c:1526) [ 12.551631][ T252] ? blocking_notifier_call_chain (kernel/notifier.c:380 kernel/notifier.c:368) [ 12.551833][ T252] ? __pfx_down_read (kernel/locking/rwsem.c:1522) [ 12.552003][ T252] ? notifier_call_chain (kernel/notifier.c:85 (discriminator 2)) [ 12.552172][ T252] blocking_notifier_call_chain (kernel/notifier.c:380 kernel/notifier.c:368) [ 12.552335][ T252] call_netdevice_notifiers (net/core/dev.c:2062) [ 12.552501][ T252] ? __pfx_call_netdevice_notifiers (net/core/dev.c:2062) [ 12.552705][ T252] ? 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) [ 12.552878][ T252] udp_tunnel_nic_register (./include/net/udp_tunnel.h:138 net/ipv4/udp_tunnel_nic.c:825) [ 12.553041][ T252] udp_tunnel_nic_netdevice_event (net/ipv4/udp_tunnel_nic.c:893) [ 12.553251][ T252] notifier_call_chain (kernel/notifier.c:85 (discriminator 2)) [ 12.553434][ T252] blocking_notifier_call_chain (kernel/notifier.c:381 kernel/notifier.c:368) [ 12.553596][ T252] register_netdevice (./include/linux/notifier.h:207 net/core/dev.c:10676) [ 12.553763][ T252] ? __pfx_register_netdevice (net/core/dev.c:10532) [ 12.553930][ T252] nsim_create (drivers/net/netdevsim/netdev.c:742 drivers/net/netdevsim/netdev.c:802) netdevsim [ 12.554106][ T252] __nsim_dev_port_add (drivers/net/netdevsim/dev.c:1393) netdevsim [ 12.554318][ T252] ? mark_lock (kernel/locking/lockdep.c:4727 (discriminator 3)) [ 12.554441][ T252] ? __pfx___nsim_dev_port_add (drivers/net/netdevsim/dev.c:1357) netdevsim [ 12.554655][ T252] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4347 kernel/locking/lockdep.c:4406) [ 12.554863][ T252] nsim_dev_port_add_all (drivers/net/netdevsim/dev.c:1449) netdevsim [ 12.555074][ T252] nsim_drv_probe (drivers/net/netdevsim/dev.c:1607) netdevsim [ 12.555247][ T252] ? __pfx_nsim_drv_probe (drivers/net/netdevsim/dev.c:1528) netdevsim [ 12.555458][ T252] ? kernfs_create_link (fs/kernfs/symlink.c:48) [ 12.555629][ T252] ? kernfs_put (./arch/x86/include/asm/atomic.h:67 (discriminator 1) ./include/linux/atomic/atomic-arch-fallback.h:2278 (discriminator 1) ./include/linux/atomic/atomic-instrumented.h:1384 (discriminator 1) fs/kernfs/dir.c:557 (discriminator 1)) [ 12.555754][ T252] ? sysfs_do_create_link_sd (fs/sysfs/symlink.c:48) [ 12.555934][ T252] really_probe (drivers/base/dd.c:579 drivers/base/dd.c:658) [ 12.556109][ T252] __driver_probe_device (drivers/base/dd.c:800) [ 12.556280][ T252] driver_probe_device (drivers/base/dd.c:830) [ 12.556447][ T252] __device_attach_driver (drivers/base/dd.c:959) [ 12.556612][ T252] ? __pfx___device_attach_driver (drivers/base/dd.c:922) [ 12.556823][ T252] bus_for_each_drv (drivers/base/bus.c:459) [ 12.556987][ T252] ? __pfx_bus_for_each_drv (drivers/base/bus.c:447) [ 12.557149][ T252] ? bus_to_subsys (drivers/base/bus.c:85) [ 12.557316][ T252] ? __pfx___lock_release (kernel/locking/lockdep.c:5501) [ 12.557484][ T252] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5814) [ 12.557653][ T252] __device_attach (drivers/base/dd.c:1030) [ 12.557821][ T252] ? __pfx___device_attach (drivers/base/dd.c:1001) [ 12.557991][ T252] ? bus_to_subsys (drivers/base/bus.c:85) [ 12.558159][ T252] ? do_raw_spin_unlock (./arch/x86/include/asm/atomic.h:23 ./include/linux/atomic/atomic-arch-fallback.h:457 ./include/linux/atomic/atomic-instrumented.h:33 ./include/asm-generic/qspinlock.h:57 kernel/locking/spinlock_debug.c:101 kernel/locking/spinlock_debug.c:141) [ 12.558325][ T252] bus_probe_device (drivers/base/bus.c:534) [ 12.558492][ T252] device_add (drivers/base/core.c:3672) [ 12.558658][ T252] ? __pfx_device_add (drivers/base/core.c:3548) [ 12.558820][ T252] ? __init_waitqueue_head (./include/linux/list.h:37 kernel/sched/wait.c:12) [ 12.558985][ T252] new_device_store (drivers/net/netdevsim/bus.c:443 drivers/net/netdevsim/bus.c:173) netdevsim [ 12.559196][ T252] ? __pfx_new_device_store (drivers/net/netdevsim/bus.c:142) netdevsim [ 12.559414][ T252] ? __pfx_sysfs_kf_write (fs/sysfs/file.c:132) [ 12.559575][ T252] ? sysfs_file_ops (fs/sysfs/file.c:31 (discriminator 1)) [ 12.559744][ T252] ? __pfx_sysfs_kf_write (fs/sysfs/file.c:132) [ 12.559906][ T252] kernfs_fop_write_iter (fs/kernfs/file.c:334) [ 12.560070][ T252] vfs_write (fs/read_write.c:586 fs/read_write.c:679) [ 12.560194][ T252] ? __pfx_vfs_write (fs/read_write.c:660) [ 12.560356][ T252] ? __lock_release (kernel/locking/lockdep.c:5525) [ 12.560517][ T252] ? do_user_addr_fault (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:880 ./include/linux/mm.h:742 arch/x86/mm/fault.c:1340) [ 12.560682][ T252] ? __pfx___up_read (kernel/locking/rwsem.c:1337) [ 12.560851][ T252] ksys_write (fs/read_write.c:731) [ 12.560974][ T252] ? __pfx_ksys_write (fs/read_write.c:721) [ 12.561135][ T252] ? do_user_addr_fault (./include/linux/rcupdate.h:882 ./include/linux/mm.h:742 arch/x86/mm/fault.c:1340) [ 12.561299][ T252] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) [ 12.561463][ T252] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 12.561663][ T252] RIP: 0033:0x7fa003f84b77 [ 12.561832][ T252] 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 [ 12.562423][ T252] RSP: 002b:00007ffd52399758 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 12.562671][ T252] RAX: ffffffffffffffda RBX: 00007fa003d6a140 RCX: 00007fa003f84b77 [ 12.562916][ T252] RDX: 0000000000000009 RSI: 000055f2070617e0 RDI: 0000000000000005 [ 12.563171][ T252] RBP: 0000000000000009 R08: 0000000000000000 R09: 0000000000000000 [ 12.563420][ T252] R10: 0000000000000002 R11: 0000000000000246 R12: 00007f9ff5bee040 Finger prints: print_deadlock_bug:validate_chain:__lock_acquire:down_read:blocking_notifier_call_chain