====================================== | [ 159.548938][ T71] ================================================================== | [ 159.549273][ T71] 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) | [ 159.549544][ T71] Write of size 8 at addr 0000000000000000 by task kworker/u16:1/71 | [ 159.549840][ T71] [ 159.549960][ T71] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 159.549962][ T71] Workqueue: netns cleanup_net [ 159.549976][ T71] Call Trace: [ 159.549977][ T71] [ 159.549980][ T71] dump_stack_lvl (lib/dump_stack.c:123) [ 159.549988][ T71] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 159.549991][ T71] kasan_report (mm/kasan/report.c:597) [ 159.549997][ T71] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 159.550003][ T71] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 159.550007][ T71] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 159.550012][ T71] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 159.550015][ T71] ? enable_delayed_work (kernel/workqueue.c:4359) [ 159.550020][ T71] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 159.550025][ T71] __cancel_work_sync (kernel/workqueue.c:4383) [ 159.550029][ T71] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 159.550035][ T71] ? netdev_notify_peers (net/core/dev.c:1891) [ 159.550040][ T71] ? netif_close_many (net/core/dev.c:1959) [ 159.550045][ T71] netif_close_many (net/core/dev.c:1959) [ 159.550048][ T71] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 159.550054][ T71] ? __dev_close_many (net/core/dev.c:1949) [ 159.550058][ T71] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 159.550063][ T71] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 159.550067][ T71] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 159.550071][ T71] ? 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) [ 159.550074][ T71] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 159.550077][ T71] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 159.550079][ T71] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 159.550082][ T71] ? unregister_netdevice_many (net/core/dev.c:12441) [ 159.550085][ T71] ? unregister_netdevice_many (net/core/dev.c:12441) [ 159.550091][ T71] default_device_exit_batch (net/core/dev.c:13229) [ 159.550094][ T71] ? unregister_netdev (net/core/dev.c:13204) [ 159.550100][ T71] ops_undo_list (net/core/net_namespace.c:251) [ 159.550105][ T71] ? netns_get (net/core/net_namespace.c:223) [ 159.550107][ T71] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 159.550113][ T71] cleanup_net (net/core/net_namespace.c:698) [ 159.550117][ T71] ? net_passive_dec (net/core/net_namespace.c:660) [ 159.550121][ T71] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 159.550128][ T71] process_one_work (kernel/workqueue.c:3268) [ 159.550137][ T71] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 159.550143][ T71] ? assign_work (kernel/workqueue.c:1206) [ 159.550148][ T71] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 159.550154][ T71] ? rescuer_thread (kernel/workqueue.c:3373) [ 159.550158][ T71] kthread (kernel/kthread.c:463) [ 159.550162][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 159.550165][ T71] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 159.550170][ T71] ? __lock_release (kernel/locking/lockdep.c:5536) [ 159.550175][ T71] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 159.550180][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 159.550186][ T71] ret_from_fork (arch/x86/kernel/process.c:164) [ 159.550190][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 159.550195][ T71] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 159.560920][ T71] #PF: error_code(0x0002) - not-present page | [ 159.561279][ T71] PGD 0 P4D 0 | [ 159.561458][ T71] Oops: Oops: 0002 [#1] SMP KASAN | [ 159.562220][ T71] Tainted: [B]=BAD_PAGE [ 159.562388][ T71] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 159.562664][ T71] Workqueue: netns cleanup_net [ 159.562882][ T71] 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) [ 159.563267][ T71] 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 [ 159.563910][ T71] RSP: 0018:ffffc900004c7690 EFLAGS: 00010046 [ 159.564126][ T71] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9b44190a [ 159.564394][ T71] RDX: fffffbfff3f1cecd RSI: 0000000000000008 RDI: ffffffff9f8e7660 [ 159.564746][ T71] RBP: ffffc900004c76f8 R08: 0000000000000001 R09: fffffbfff3f1cecc [ 159.565080][ T71] R10: ffffffff9f8e7667 R11: ffffc900004c7180 R12: 0000000000000000 [ 159.565371][ T71] R13: 0000000000000286 R14: ffff88800a1bc000 R15: dffffc0000000000 [ 159.565736][ T71] FS: 0000000000000000(0000) GS:ffff888096984000(0000) knlGS:0000000000000000 [ 159.566025][ T71] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 159.566261][ T71] CR2: 0000000000000000 CR3: 000000001cf59001 CR4: 0000000000772ef0 [ 159.566617][ T71] PKRU: 55555554 [ 159.566750][ T71] Call Trace: [ 159.566875][ T71] [ 159.566963][ T71] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 159.567139][ T71] ? enable_delayed_work (kernel/workqueue.c:4359) [ 159.567306][ T71] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 159.567465][ T71] __cancel_work_sync (kernel/workqueue.c:4383) [ 159.567632][ T71] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 159.567829][ T71] ? netdev_notify_peers (net/core/dev.c:1891) [ 159.567997][ T71] ? netif_close_many (net/core/dev.c:1959) [ 159.568213][ T71] netif_close_many (net/core/dev.c:1959) [ 159.568382][ T71] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 159.568564][ T71] ? __dev_close_many (net/core/dev.c:1949) [ 159.568739][ T71] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 159.568942][ T71] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 159.569246][ T71] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 159.569406][ T71] ? 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) [ 159.569566][ T71] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 159.569736][ T71] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 159.569922][ T71] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 159.570119][ T71] ? unregister_netdevice_many (net/core/dev.c:12441) [ 159.570374][ T71] ? unregister_netdevice_many (net/core/dev.c:12441) [ 159.570541][ T71] default_device_exit_batch (net/core/dev.c:13229) [ 159.570832][ T71] ? unregister_netdev (net/core/dev.c:13204) [ 159.570995][ T71] ops_undo_list (net/core/net_namespace.c:251) [ 159.571172][ T71] ? netns_get (net/core/net_namespace.c:223) [ 159.571340][ T71] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 159.571502][ T71] cleanup_net (net/core/net_namespace.c:698) [ 159.571666][ T71] ? net_passive_dec (net/core/net_namespace.c:660) [ 159.571836][ T71] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 159.572000][ T71] process_one_work (kernel/workqueue.c:3268) [ 159.572162][ T71] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 159.572328][ T71] ? assign_work (kernel/workqueue.c:1206) [ 159.572585][ T71] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 159.572776][ T71] ? rescuer_thread (kernel/workqueue.c:3373) [ 159.573031][ T71] kthread (kernel/kthread.c:463) [ 159.573156][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 159.573318][ T71] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 159.573479][ T71] ? __lock_release (kernel/locking/lockdep.c:5536) [ 159.573756][ T71] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 159.574011][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 159.574183][ T71] ret_from_fork (arch/x86/kernel/process.c:164) [ 159.574348][ T71] ? 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