====================================== | [ 30.826198][ T12] ================================================================== | [ 30.826578][ 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) | [ 30.826921][ T12] Write of size 8 at addr 0000000000000000 by task kworker/u16:0/12 | [ 30.827207][ T12] [ 30.827320][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 30.827324][ T12] Workqueue: netns cleanup_net [ 30.827348][ T12] Call Trace: [ 30.827355][ T12] [ 30.827359][ T12] dump_stack_lvl (lib/dump_stack.c:123) [ 30.827379][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 30.827383][ T12] kasan_report (mm/kasan/report.c:597) [ 30.827400][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 30.827406][ T12] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 30.827410][ T12] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 30.827415][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 30.827418][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 30.827429][ T12] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 30.827437][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 30.827442][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 30.827450][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 30.827453][ T12] ? netif_close_many (net/core/dev.c:1959) [ 30.827458][ T12] netif_close_many (net/core/dev.c:1959) [ 30.827461][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 30.827476][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 30.827482][ T12] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 30.827486][ T12] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 30.827490][ T12] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 30.827496][ T12] ? default_device_exit_batch (net/core/dev.c:13215) [ 30.827501][ 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) [ 30.827505][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 30.827508][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 30.827515][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 30.827518][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 30.827521][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 30.827529][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 30.827533][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 30.827539][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 30.827545][ T12] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 30.827548][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 30.827554][ T12] cleanup_net (net/core/net_namespace.c:698) [ 30.827558][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 30.827563][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 30.827573][ T12] process_one_work (kernel/workqueue.c:3268) [ 30.827580][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 30.827586][ T12] ? assign_work (kernel/workqueue.c:1206) [ 30.827590][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 30.827596][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 30.827600][ T12] kthread (kernel/kthread.c:463) [ 30.827607][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 30.827610][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 30.827623][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 30.827627][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 30.827630][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 30.827634][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 30.827636][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 30.827639][ T12] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 30.838717][ T12] #PF: error_code(0x0002) - not-present page | [ 30.838963][ T12] PGD 0 P4D 0 | [ 30.839108][ T12] Oops: Oops: 0002 [#1] SMP KASAN | [ 30.839732][ T12] Tainted: [B]=BAD_PAGE [ 30.839899][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 30.840131][ T12] Workqueue: netns cleanup_net [ 30.840332][ 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) [ 30.840580][ 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 [ 30.841247][ T12] RSP: 0000:ffffc900000c7680 EFLAGS: 00010046 [ 30.841489][ T12] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffb7e49b8a [ 30.841782][ T12] RDX: fffffbfff796cacd RSI: 0000000000000008 RDI: ffffffffbcb65660 [ 30.842072][ T12] RBP: ffffc900000c76e8 R08: 0000000000000001 R09: fffffbfff796cacc [ 30.842355][ T12] R10: ffffffffbcb65667 R11: ffffc900000c7140 R12: 0000000000000000 [ 30.842645][ T12] R13: 0000000000000282 R14: ffff8880049ac000 R15: dffffc0000000000 [ 30.842942][ T12] FS: 0000000000000000(0000) GS:ffff8880b0587000(0000) knlGS:0000000000000000 [ 30.843256][ T12] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 30.843496][ T12] CR2: 0000000000000000 CR3: 000000000aaa9002 CR4: 0000000000772ef0 [ 30.843778][ T12] PKRU: 55555554 [ 30.843936][ T12] Call Trace: [ 30.844079][ T12] [ 30.844187][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 30.844374][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 30.844575][ T12] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 30.844762][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 30.844974][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 30.845166][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 30.845344][ T12] ? netif_close_many (net/core/dev.c:1959) [ 30.845535][ T12] netif_close_many (net/core/dev.c:1959) [ 30.845718][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 30.845911][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 30.846090][ T12] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 30.846312][ T12] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 30.846513][ T12] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 30.846747][ T12] ? default_device_exit_batch (net/core/dev.c:13215) [ 30.846945][ 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) [ 30.847126][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 30.847305][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 30.847500][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 30.847723][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 30.847920][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 30.848204][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 30.848378][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 30.848572][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 30.848766][ T12] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 30.849057][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 30.849235][ T12] cleanup_net (net/core/net_namespace.c:698) [ 30.849415][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 30.849609][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 30.849797][ T12] process_one_work (kernel/workqueue.c:3268) [ 30.849992][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 30.850174][ T12] ? assign_work (kernel/workqueue.c:1206) [ 30.850348][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 30.850637][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 30.850819][ T12] kthread (kernel/kthread.c:463) [ 30.850979][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 30.851153][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 30.851436][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 30.851642][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 30.851828][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 30.852022][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 30.852293][ 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