====================================== | [ 24.876021][ T68] ================================================================== | [ 24.876406][ 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) | [ 24.876701][ T68] Write of size 8 at addr 0000000000000000 by task kworker/u16:1/68 | [ 24.876984][ T68] [ 24.877095][ T68] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 24.877100][ T68] Workqueue: netns cleanup_net [ 24.877111][ T68] Call Trace: [ 24.877113][ T68] [ 24.877117][ T68] dump_stack_lvl (lib/dump_stack.c:123) [ 24.877128][ T68] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 24.877131][ T68] kasan_report (mm/kasan/report.c:597) [ 24.877140][ T68] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 24.877146][ T68] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 24.877150][ T68] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 24.877155][ T68] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 24.877158][ T68] ? enable_delayed_work (kernel/workqueue.c:4359) [ 24.877163][ T68] ? qdisc_destroy (net/sched/sch_generic.c:1355) [ 24.877173][ T68] __cancel_work_sync (kernel/workqueue.c:4383) [ 24.877178][ T68] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 24.877183][ T68] ? netdev_notify_peers (net/core/dev.c:1891) [ 24.877187][ T68] ? __mutex_lock (./arch/x86/include/asm/preempt.h:104 kernel/locking/mutex.c:739 kernel/locking/mutex.c:760) [ 24.877196][ T68] netif_close_many (net/core/dev.c:1959) [ 24.877200][ T68] ? ww_mutex_lock (kernel/locking/mutex.c:759) [ 24.877204][ T68] ? __dev_close_many (net/core/dev.c:1949) [ 24.877207][ T68] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 24.877216][ T68] netif_close_many_and_unlock (net/core/dev.c:12476) [ 24.877220][ T68] unregister_netdevice_many_notify (net/core/dev.c:12539) [ 24.877225][ T68] ? default_device_exit_batch (net/core/dev.c:13215) [ 24.877230][ T68] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 24.877235][ T68] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 24.877238][ T68] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 24.877240][ T68] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 24.877244][ T68] ? unregister_netdevice_many (net/core/dev.c:12441) [ 24.877250][ T68] default_device_exit_batch (net/core/dev.c:13229) [ 24.877254][ T68] ? unregister_netdev (net/core/dev.c:13204) [ 24.877260][ T68] ops_undo_list (net/core/net_namespace.c:251) [ 24.877266][ T68] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 24.877269][ T68] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 24.877275][ T68] cleanup_net (net/core/net_namespace.c:698) [ 24.877280][ T68] ? net_passive_dec (net/core/net_namespace.c:660) [ 24.877284][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 24.877291][ T68] process_one_work (kernel/workqueue.c:3268) [ 24.877298][ T68] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 24.877303][ T68] ? assign_work (kernel/workqueue.c:1206) [ 24.877308][ T68] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 24.877314][ T68] ? rescuer_thread (kernel/workqueue.c:3373) [ 24.877318][ T68] kthread (kernel/kthread.c:463) [ 24.877322][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 24.877325][ T68] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 24.877332][ T68] ? __lock_release (kernel/locking/lockdep.c:5536) [ 24.877337][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 24.877340][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 24.877345][ T68] ret_from_fork (arch/x86/kernel/process.c:164) [ 24.877348][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 24.877353][ T68] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 24.888360][ T68] #PF: error_code(0x0002) - not-present page | [ 24.888593][ T68] PGD 0 P4D 0 | [ 24.888744][ T68] Oops: Oops: 0002 [#1] SMP KASAN | [ 24.889365][ T68] Tainted: [B]=BAD_PAGE [ 24.889510][ T68] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 24.889749][ T68] Workqueue: netns cleanup_net [ 24.889951][ 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) [ 24.890207][ 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 1f 93 82 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 1f 93 82 00 call 0x829349 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 [ 24.890882][ T68] RSP: 0018:ffffc90000497630 EFLAGS: 00010046 [ 24.891127][ T68] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffa6e49b8a [ 24.891413][ T68] RDX: fffffbfff576cacd RSI: 0000000000000008 RDI: ffffffffabb65660 [ 24.891701][ T68] RBP: ffffc90000497698 R08: 0000000000000001 R09: fffffbfff576cacc [ 24.891981][ T68] R10: ffffffffabb65667 R11: ffffc90000497100 R12: 0000000000000000 [ 24.892266][ T68] R13: 0000000000000286 R14: ffff88800bdfc000 R15: dffffc0000000000 [ 24.892550][ T68] FS: 0000000000000000(0000) GS:ffff8880bb107000(0000) knlGS:0000000000000000 [ 24.892888][ T68] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 24.893146][ T68] CR2: 0000000000000000 CR3: 0000000073b49003 CR4: 0000000000772ef0 [ 24.893444][ T68] PKRU: 55555554 [ 24.893595][ T68] Call Trace: [ 24.893739][ T68] [ 24.893839][ T68] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 24.894030][ T68] ? enable_delayed_work (kernel/workqueue.c:4359) [ 24.894231][ T68] ? qdisc_destroy (net/sched/sch_generic.c:1355) [ 24.894439][ T68] __cancel_work_sync (kernel/workqueue.c:4383) [ 24.894628][ T68] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 24.894817][ T68] ? netdev_notify_peers (net/core/dev.c:1891) [ 24.895006][ T68] ? __mutex_lock (./arch/x86/include/asm/preempt.h:104 kernel/locking/mutex.c:739 kernel/locking/mutex.c:760) [ 24.895206][ T68] netif_close_many (net/core/dev.c:1959) [ 24.895402][ T68] ? ww_mutex_lock (kernel/locking/mutex.c:759) [ 24.895696][ T68] ? __dev_close_many (net/core/dev.c:1949) [ 24.895885][ T68] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 24.896075][ T68] netif_close_many_and_unlock (net/core/dev.c:12476) [ 24.896273][ T68] unregister_netdevice_many_notify (net/core/dev.c:12539) [ 24.896608][ T68] ? default_device_exit_batch (net/core/dev.c:13215) [ 24.896792][ T68] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 24.896976][ T68] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 24.897190][ T68] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 24.897499][ T68] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 24.897728][ T68] ? unregister_netdevice_many (net/core/dev.c:12441) [ 24.897933][ T68] default_device_exit_batch (net/core/dev.c:13229) [ 24.898123][ T68] ? unregister_netdev (net/core/dev.c:13204) [ 24.898315][ T68] ops_undo_list (net/core/net_namespace.c:251) [ 24.898504][ T68] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 24.898693][ T68] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 24.898883][ T68] cleanup_net (net/core/net_namespace.c:698) [ 24.899171][ T68] ? net_passive_dec (net/core/net_namespace.c:660) [ 24.899367][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 24.899560][ T68] process_one_work (kernel/workqueue.c:3268) [ 24.899748][ T68] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 24.899935][ T68] ? assign_work (kernel/workqueue.c:1206) [ 24.900122][ T68] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 24.900314][ T68] ? rescuer_thread (kernel/workqueue.c:3373) [ 24.900506][ T68] kthread (kernel/kthread.c:463) [ 24.900750][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 24.900939][ T68] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 24.901131][ T68] ? __lock_release (kernel/locking/lockdep.c:5536) [ 24.901321][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 24.901608][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 24.901795][ T68] ret_from_fork (arch/x86/kernel/process.c:164) [ 24.901986][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) Finger prints: kasan_report:kasan_check_range:try_to_grab_pending:__cancel_work:__cancel_work_sync try_to_grab_pending:__cancel_work:__cancel_work_sync:__dev_close_many:netif_close_many