====================================== | [ 68.453124][ T68] ================================================================== | [ 68.453467][ T68] BUG: KASAN: null-ptr-deref in try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) | [ 68.453739][ T68] Write of size 8 at addr 0000000000000000 by task kworker/u16:1/68 | [ 68.454014][ T68] [ 68.454122][ T68] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 68.454127][ T68] Workqueue: netns cleanup_net [ 68.454138][ T68] Call Trace: [ 68.454143][ T68] [ 68.454145][ T68] dump_stack_lvl (lib/dump_stack.c:123) [ 68.454154][ T68] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 68.454157][ T68] kasan_report (mm/kasan/report.c:597) [ 68.454165][ T68] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 68.454171][ T68] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 68.454175][ T68] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 68.454180][ T68] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 68.454184][ T68] ? enable_delayed_work (kernel/workqueue.c:4359) [ 68.454189][ T68] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 68.454194][ T68] __cancel_work_sync (kernel/workqueue.c:4383) [ 68.454198][ T68] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 68.454206][ T68] ? netdev_notify_peers (net/core/dev.c:1891) [ 68.454211][ T68] ? netif_close_many (net/core/dev.c:1959) [ 68.454216][ T68] netif_close_many (net/core/dev.c:1959) [ 68.454219][ T68] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 68.454227][ T68] ? __dev_close_many (net/core/dev.c:1949) [ 68.454231][ T68] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 68.454236][ T68] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 68.454240][ T68] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 68.454244][ T68] ? 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:67) [ 68.454248][ T68] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 68.454251][ T68] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 68.454254][ T68] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 68.454257][ T68] ? unregister_netdevice_many (net/core/dev.c:12441) [ 68.454260][ T68] ? unregister_netdevice_many (net/core/dev.c:12441) [ 68.454266][ T68] default_device_exit_batch (net/core/dev.c:13229) [ 68.454269][ T68] ? unregister_netdev (net/core/dev.c:13204) [ 68.454275][ T68] ops_undo_list (net/core/net_namespace.c:251) [ 68.454280][ T68] ? netns_get (net/core/net_namespace.c:223) [ 68.454283][ T68] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 68.454289][ T68] cleanup_net (net/core/net_namespace.c:698) [ 68.454292][ T68] ? net_passive_dec (net/core/net_namespace.c:660) [ 68.454297][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 68.454305][ T68] process_one_work (kernel/workqueue.c:3268) [ 68.454312][ T68] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 68.454318][ T68] ? assign_work (kernel/workqueue.c:1206) [ 68.454323][ T68] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 68.454329][ T68] ? rescuer_thread (kernel/workqueue.c:3373) [ 68.454333][ T68] kthread (kernel/kthread.c:463) [ 68.454339][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 68.454342][ T68] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 68.454348][ T68] ? __lock_release (kernel/locking/lockdep.c:5536) [ 68.454352][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 68.454355][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 68.454359][ T68] ret_from_fork (arch/x86/kernel/process.c:164) [ 68.454362][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 68.454365][ T68] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 68.465055][ T68] #PF: error_code(0x0002) - not-present page | [ 68.465359][ T68] PGD 0 P4D 0 | [ 68.465493][ T68] Oops: Oops: 0002 [#1] SMP KASAN | [ 68.466151][ T68] Tainted: [B]=BAD_PAGE [ 68.466289][ T68] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 68.466500][ T68] Workqueue: netns cleanup_net [ 68.466680][ T68] RIP: 0010:try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 68.466906][ T68] Code: 00 41 89 c0 b8 01 00 00 00 45 85 c0 74 0f 48 83 c4 10 5b 5d 41 5c 41 5d 41 5e 41 5f c3 be 08 00 00 00 48 89 df e8 6f 7d 81 00 48 0f ba 2b 00 72 11 48 83 c4 10 31 c0 5b 5d 41 5c 41 5d 41 5e All code ======== 0: 00 41 89 add %al,-0x77(%rcx) 3: c0 b8 01 00 00 00 45 sarb $0x45,0x1(%rax) a: 85 c0 test %eax,%eax c: 74 0f je 0x1d e: 48 83 c4 10 add $0x10,%rsp 12: 5b pop %rbx 13: 5d pop %rbp 14: 41 5c pop %r12 16: 41 5d pop %r13 18: 41 5e pop %r14 1a: 41 5f pop %r15 1c: c3 ret 1d: be 08 00 00 00 mov $0x8,%esi 22: 48 89 df mov %rbx,%rdi 25: e8 6f 7d 81 00 call 0x817d99 2a:* f0 48 0f ba 2b 00 lock btsq $0x0,(%rbx) <-- trapping instruction 30: 72 11 jb 0x43 32: 48 83 c4 10 add $0x10,%rsp 36: 31 c0 xor %eax,%eax 38: 5b pop %rbx 39: 5d pop %rbp 3a: 41 5c pop %r12 3c: 41 5d pop %r13 3e: 41 5e pop %r14 Code starting with the faulting instruction =========================================== 0: f0 48 0f ba 2b 00 lock btsq $0x0,(%rbx) 6: 72 11 jb 0x19 8: 48 83 c4 10 add $0x10,%rsp c: 31 c0 xor %eax,%eax e: 5b pop %rbx f: 5d pop %rbp 10: 41 5c pop %r12 12: 41 5d pop %r13 14: 41 5e pop %r14 [ 68.467517][ T68] RSP: 0018:ffffc90000497690 EFLAGS: 00010046 [ 68.467840][ T68] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffa1c4190a [ 68.468115][ T68] RDX: fffffbfff4c1cecd RSI: 0000000000000008 RDI: ffffffffa60e7660 [ 68.468478][ T68] RBP: ffffc900004976f8 R08: 0000000000000001 R09: fffffbfff4c1cecc [ 68.468737][ T68] R10: ffffffffa60e7667 R11: ffffc90000497180 R12: 0000000000000000 [ 68.469003][ T68] R13: 0000000000000286 R14: ffff88800b284000 R15: dffffc0000000000 [ 68.469360][ T68] FS: 0000000000000000(0000) GS:ffff88808a404000(0000) knlGS:0000000000000000 [ 68.469667][ T68] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 68.469885][ T68] CR2: 0000000000000000 CR3: 0000000037559003 CR4: 0000000000772ef0 [ 68.470252][ T68] PKRU: 55555554 [ 68.470386][ T68] Call Trace: [ 68.470515][ T68] [ 68.470613][ T68] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 68.470887][ T68] ? enable_delayed_work (kernel/workqueue.c:4359) [ 68.471065][ T68] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 68.471236][ T68] __cancel_work_sync (kernel/workqueue.c:4383) [ 68.471411][ T68] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 68.471686][ T68] ? netdev_notify_peers (net/core/dev.c:1891) [ 68.471858][ T68] ? netif_close_many (net/core/dev.c:1959) [ 68.472033][ T68] netif_close_many (net/core/dev.c:1959) [ 68.472202][ T68] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 68.472467][ T68] ? __dev_close_many (net/core/dev.c:1949) [ 68.472641][ T68] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 68.472852][ T68] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 68.473067][ T68] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 68.473337][ T68] ? 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:67) [ 68.473506][ T68] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 68.473674][ T68] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 68.473847][ T68] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 68.474154][ T68] ? unregister_netdevice_many (net/core/dev.c:12441) [ 68.474321][ T68] ? unregister_netdevice_many (net/core/dev.c:12441) [ 68.474492][ T68] default_device_exit_batch (net/core/dev.c:13229) [ 68.474664][ T68] ? unregister_netdev (net/core/dev.c:13204) [ 68.474936][ T68] ops_undo_list (net/core/net_namespace.c:251) [ 68.475109][ T68] ? netns_get (net/core/net_namespace.c:223) [ 68.475278][ T68] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 68.475449][ T68] cleanup_net (net/core/net_namespace.c:698) [ 68.475715][ T68] ? net_passive_dec (net/core/net_namespace.c:660) [ 68.475883][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 68.476056][ T68] process_one_work (kernel/workqueue.c:3268) [ 68.476232][ T68] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 68.476499][ T68] ? assign_work (kernel/workqueue.c:1206) [ 68.476667][ T68] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 68.476837][ T68] ? rescuer_thread (kernel/workqueue.c:3373) [ 68.477012][ T68] kthread (kernel/kthread.c:463) [ 68.477235][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 68.477401][ T68] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 68.477572][ T68] ? __lock_release (kernel/locking/lockdep.c:5536) [ 68.477747][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 68.477937][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 68.478108][ T68] ret_from_fork (arch/x86/kernel/process.c:164) [ 68.478275][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) Finger prints: try_to_grab_pending:__cancel_work:__cancel_work_sync:__dev_close_many:netif_close_many kasan_report:kasan_check_range:try_to_grab_pending:__cancel_work:__cancel_work_sync