====================================== | [ 21.221805][ T12] ================================================================== | [ 21.222123][ T12] 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) | [ 21.222402][ T12] Write of size 8 at addr 0000000000000000 by task kworker/u16:0/12 | [ 21.222669][ T12] [ 21.222778][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 21.222781][ T12] Workqueue: netns cleanup_net [ 21.222790][ T12] Call Trace: [ 21.222791][ T12] [ 21.222794][ T12] dump_stack_lvl (lib/dump_stack.c:123) [ 21.222800][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 21.222804][ T12] kasan_report (mm/kasan/report.c:597) [ 21.222811][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 21.222816][ T12] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 21.222821][ T12] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 21.222825][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 21.222828][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 21.222833][ T12] ? qdisc_destroy (net/sched/sch_generic.c:1355) [ 21.222840][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 21.222844][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 21.222849][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 21.222852][ T12] ? __mutex_lock (./arch/x86/include/asm/preempt.h:104 kernel/locking/mutex.c:739 kernel/locking/mutex.c:760) [ 21.222859][ T12] netif_close_many (net/core/dev.c:1959) [ 21.222862][ T12] ? ww_mutex_lock (kernel/locking/mutex.c:759) [ 21.222867][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 21.222870][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 21.222877][ T12] netif_close_many_and_unlock (net/core/dev.c:12476) [ 21.222882][ T12] unregister_netdevice_many_notify (net/core/dev.c:12539) [ 21.222890][ T12] ? default_device_exit_batch (net/core/dev.c:13215) [ 21.222897][ T12] ? 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) [ 21.222902][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 21.222905][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 21.222908][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 21.222911][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 21.222915][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 21.222921][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 21.222924][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 21.222931][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 21.222936][ T12] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 21.222940][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 21.222946][ T12] cleanup_net (net/core/net_namespace.c:698) [ 21.222950][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 21.222955][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 21.222965][ T12] process_one_work (kernel/workqueue.c:3268) [ 21.222975][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 21.222982][ T12] ? assign_work (kernel/workqueue.c:1206) [ 21.222986][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 21.222992][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 21.222996][ T12] kthread (kernel/kthread.c:463) [ 21.223001][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 21.223016][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 21.223021][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 21.223025][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 21.223028][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 21.223032][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 21.223034][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 21.223037][ T12] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 21.233836][ T12] #PF: error_code(0x0002) - not-present page | [ 21.234064][ T12] PGD 0 P4D 0 | [ 21.234218][ T12] Oops: Oops: 0002 [#1] SMP KASAN | [ 21.234803][ T12] Tainted: [B]=BAD_PAGE [ 21.234946][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 21.235182][ T12] Workqueue: netns cleanup_net [ 21.235373][ T12] 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) [ 21.235607][ T12] 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 [ 21.236265][ T12] RSP: 0018:ffffc900000c7630 EFLAGS: 00010046 [ 21.236477][ T12] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffb2249b8a [ 21.236764][ T12] RDX: fffffbfff6decacd RSI: 0000000000000008 RDI: ffffffffb6f65660 [ 21.237031][ T12] RBP: ffffc900000c7698 R08: 0000000000000001 R09: fffffbfff6decacc [ 21.237305][ T12] R10: ffffffffb6f65667 R11: ffffc900000c7100 R12: 0000000000000000 [ 21.237564][ T12] R13: 0000000000000286 R14: ffff88800bcd1000 R15: dffffc0000000000 [ 21.237846][ T12] FS: 0000000000000000(0000) GS:ffff8880b6287000(0000) knlGS:0000000000000000 [ 21.238162][ T12] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 21.238387][ T12] CR2: 0000000000000000 CR3: 000000000cc65005 CR4: 0000000000772ef0 [ 21.238668][ T12] PKRU: 55555554 [ 21.238808][ T12] Call Trace: [ 21.238943][ T12] [ 21.239041][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 21.239231][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 21.239402][ T12] ? qdisc_destroy (net/sched/sch_generic.c:1355) [ 21.239573][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 21.239764][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 21.239940][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 21.240122][ T12] ? __mutex_lock (./arch/x86/include/asm/preempt.h:104 kernel/locking/mutex.c:739 kernel/locking/mutex.c:760) [ 21.240311][ T12] netif_close_many (net/core/dev.c:1959) [ 21.240476][ T12] ? ww_mutex_lock (kernel/locking/mutex.c:759) [ 21.240663][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 21.240848][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 21.241037][ T12] netif_close_many_and_unlock (net/core/dev.c:12476) [ 21.241230][ T12] unregister_netdevice_many_notify (net/core/dev.c:12539) [ 21.241445][ T12] ? default_device_exit_batch (net/core/dev.c:13215) [ 21.241626][ T12] ? 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) [ 21.241809][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 21.241994][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 21.242180][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 21.242402][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 21.242572][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 21.242771][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 21.242946][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 21.243140][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 21.243356][ T12] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 21.243523][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 21.243718][ T12] cleanup_net (net/core/net_namespace.c:698) [ 21.243900][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 21.244088][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 21.244275][ T12] process_one_work (kernel/workqueue.c:3268) [ 21.244448][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 21.244627][ T12] ? assign_work (kernel/workqueue.c:1206) [ 21.244813][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 21.244996][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 21.245179][ T12] kthread (kernel/kthread.c:463) [ 21.245317][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 21.245482][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 21.245665][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 21.245848][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 21.246032][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 21.246223][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 21.246394][ T12] ? 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