====================================== | [ 20.424816][ T12] ================================================================== | [ 20.425134][ 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) | [ 20.425451][ T12] Write of size 8 at addr 0000000000000000 by task kworker/u16:0/12 | [ 20.425710][ T12] [ 20.425829][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 20.425832][ T12] Workqueue: netns cleanup_net [ 20.425850][ T12] Call Trace: [ 20.425856][ T12] [ 20.425859][ T12] dump_stack_lvl (lib/dump_stack.c:123) [ 20.425869][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 20.425873][ T12] kasan_report (mm/kasan/report.c:597) [ 20.425883][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 20.425888][ T12] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 20.425892][ T12] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 20.425897][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 20.425901][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 20.425907][ T12] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 20.425912][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 20.425917][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 20.425924][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 20.425927][ T12] ? netif_close_many (net/core/dev.c:1959) [ 20.425931][ T12] netif_close_many (net/core/dev.c:1959) [ 20.425935][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 20.425942][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 20.425945][ T12] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 20.425948][ T12] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 20.425952][ T12] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 20.425957][ T12] ? default_device_exit_batch (net/core/dev.c:13215) [ 20.425962][ 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) [ 20.425965][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 20.425968][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 20.425975][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 20.425977][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 20.425981][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 20.425989][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 20.425992][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 20.425999][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 20.426004][ T12] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 20.426008][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 20.426014][ T12] cleanup_net (net/core/net_namespace.c:698) [ 20.426018][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 20.426023][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 20.426031][ T12] process_one_work (kernel/workqueue.c:3268) [ 20.426038][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 20.426044][ T12] ? assign_work (kernel/workqueue.c:1206) [ 20.426048][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 20.426054][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 20.426058][ T12] kthread (kernel/kthread.c:463) [ 20.426062][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 20.426065][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 20.426073][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 20.426077][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 20.426080][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 20.426084][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 20.426086][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 20.426089][ T12] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 20.436517][ T12] #PF: error_code(0x0002) - not-present page | [ 20.436737][ T12] PGD 0 P4D 0 | [ 20.436875][ T12] Oops: Oops: 0002 [#1] SMP KASAN | [ 20.437462][ T12] Tainted: [B]=BAD_PAGE [ 20.437594][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 20.437809][ T12] Workqueue: netns cleanup_net [ 20.437995][ 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) [ 20.438219][ 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 [ 20.438845][ T12] RSP: 0018:ffffc900000c7680 EFLAGS: 00010046 [ 20.439060][ T12] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffb9649b8a [ 20.439333][ T12] RDX: fffffbfff7c6cacd RSI: 0000000000000008 RDI: ffffffffbe365660 [ 20.439598][ T12] RBP: ffffc900000c76e8 R08: 0000000000000001 R09: fffffbfff7c6cacc [ 20.439850][ T12] R10: ffffffffbe365667 R11: ffffc900000c7140 R12: 0000000000000000 [ 20.440098][ T12] R13: 0000000000000282 R14: ffff88800c884000 R15: dffffc0000000000 [ 20.440374][ T12] FS: 0000000000000000(0000) GS:ffff8880aed87000(0000) knlGS:0000000000000000 [ 20.440675][ T12] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 20.440892][ T12] CR2: 0000000000000000 CR3: 0000000029349005 CR4: 0000000000772ef0 [ 20.441144][ T12] PKRU: 55555554 [ 20.441293][ T12] Call Trace: [ 20.441426][ T12] [ 20.441520][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 20.441695][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 20.441876][ T12] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 20.442043][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 20.442216][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 20.442410][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 20.442582][ T12] ? netif_close_many (net/core/dev.c:1959) [ 20.442755][ T12] netif_close_many (net/core/dev.c:1959) [ 20.442927][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 20.443099][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 20.443311][ T12] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 20.443547][ T12] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 20.443722][ T12] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 20.443939][ T12] ? default_device_exit_batch (net/core/dev.c:13215) [ 20.444107][ 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) [ 20.444293][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 20.444470][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 20.444640][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 20.444849][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 20.445014][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 20.445183][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 20.445373][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 20.445547][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 20.445736][ T12] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 20.445908][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 20.446077][ T12] cleanup_net (net/core/net_namespace.c:698) [ 20.446268][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 20.446450][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 20.446631][ T12] process_one_work (kernel/workqueue.c:3268) [ 20.446806][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 20.446977][ T12] ? assign_work (kernel/workqueue.c:1206) [ 20.447148][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 20.447339][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 20.447507][ T12] kthread (kernel/kthread.c:463) [ 20.447637][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 20.447805][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 20.447974][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 20.448141][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 20.448332][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 20.448506][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 20.448675][ 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