====================================== | [ 20.829307][ T69] ================================================================== | [ 20.829598][ T69] 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.829886][ T69] Write of size 8 at addr 0000000000000000 by task kworker/u16:1/69 | [ 20.830131][ T69] [ 20.830229][ T69] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 20.830232][ T69] Workqueue: netns cleanup_net [ 20.830247][ T69] Call Trace: [ 20.830251][ T69] [ 20.830254][ T69] dump_stack_lvl (lib/dump_stack.c:123) [ 20.830263][ T69] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 20.830269][ T69] kasan_report (mm/kasan/report.c:597) [ 20.830279][ T69] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 20.830285][ T69] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 20.830289][ T69] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 20.830294][ T69] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 20.830297][ T69] ? enable_delayed_work (kernel/workqueue.c:4359) [ 20.830304][ T69] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 20.830309][ T69] __cancel_work_sync (kernel/workqueue.c:4383) [ 20.830313][ T69] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 20.830319][ T69] ? netdev_notify_peers (net/core/dev.c:1891) [ 20.830322][ T69] ? netif_close_many (net/core/dev.c:1959) [ 20.830326][ T69] netif_close_many (net/core/dev.c:1959) [ 20.830329][ T69] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 20.830336][ T69] ? __dev_close_many (net/core/dev.c:1949) [ 20.830339][ T69] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 20.830342][ T69] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 20.830347][ T69] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 20.830351][ T69] ? default_device_exit_batch (net/core/dev.c:13215) [ 20.830356][ T69] ? 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.830359][ T69] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 20.830362][ T69] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 20.830367][ T69] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 20.830370][ T69] ? unregister_netdevice_many (net/core/dev.c:12441) [ 20.830373][ T69] ? unregister_netdevice_many (net/core/dev.c:12441) [ 20.830379][ T69] default_device_exit_batch (net/core/dev.c:13229) [ 20.830384][ T69] ? unregister_netdev (net/core/dev.c:13204) [ 20.830390][ T69] ops_undo_list (net/core/net_namespace.c:251) [ 20.830396][ T69] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 20.830399][ T69] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 20.830406][ T69] cleanup_net (net/core/net_namespace.c:698) [ 20.830410][ T69] ? net_passive_dec (net/core/net_namespace.c:660) [ 20.830415][ T69] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 20.830423][ T69] process_one_work (kernel/workqueue.c:3268) [ 20.830430][ T69] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 20.830436][ T69] ? assign_work (kernel/workqueue.c:1206) [ 20.830440][ T69] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 20.830446][ T69] ? rescuer_thread (kernel/workqueue.c:3373) [ 20.830450][ T69] kthread (kernel/kthread.c:463) [ 20.830455][ T69] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 20.830457][ T69] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 20.830464][ T69] ? __lock_release (kernel/locking/lockdep.c:5536) [ 20.830469][ T69] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 20.830472][ T69] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 20.830476][ T69] ret_from_fork (arch/x86/kernel/process.c:164) [ 20.830478][ T69] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 20.830481][ T69] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 20.840103][ T69] #PF: error_code(0x0002) - not-present page | [ 20.840300][ T69] PGD 0 P4D 0 | [ 20.840426][ T69] Oops: Oops: 0002 [#1] SMP KASAN | [ 20.840962][ T69] Tainted: [B]=BAD_PAGE [ 20.841087][ T69] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 20.841291][ T69] Workqueue: netns cleanup_net [ 20.841467][ T69] 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.841677][ T69] 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.842273][ T69] RSP: 0000:ffffc900004a7680 EFLAGS: 00010046 [ 20.842483][ T69] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffa1e49b8a [ 20.842826][ T69] RDX: fffffbfff4d6cacd RSI: 0000000000000008 RDI: ffffffffa6b65660 [ 20.843067][ T69] RBP: ffffc900004a76e8 R08: 0000000000000001 R09: fffffbfff4d6cacc [ 20.843305][ T69] R10: ffffffffa6b65667 R11: ffffc900004a7140 R12: 0000000000000000 [ 20.843546][ T69] R13: 0000000000000282 R14: ffff88800b5fc000 R15: dffffc0000000000 [ 20.843794][ T69] FS: 0000000000000000(0000) GS:ffff8880c6607000(0000) knlGS:0000000000000000 [ 20.844085][ T69] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 20.844293][ T69] CR2: 0000000000000000 CR3: 000000003e549005 CR4: 0000000000772ef0 [ 20.844537][ T69] PKRU: 55555554 [ 20.844659][ T69] Call Trace: [ 20.844883][ T69] [ 20.844969][ T69] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 20.845133][ T69] ? enable_delayed_work (kernel/workqueue.c:4359) [ 20.845297][ T69] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 20.845463][ T69] __cancel_work_sync (kernel/workqueue.c:4383) [ 20.845621][ T69] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 20.845784][ T69] ? netdev_notify_peers (net/core/dev.c:1891) [ 20.845949][ T69] ? netif_close_many (net/core/dev.c:1959) [ 20.846109][ T69] netif_close_many (net/core/dev.c:1959) [ 20.846365][ T69] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 20.846527][ T69] ? __dev_close_many (net/core/dev.c:1949) [ 20.846689][ T69] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 20.846989][ T69] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 20.847151][ T69] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 20.847348][ T69] ? default_device_exit_batch (net/core/dev.c:13215) [ 20.847601][ T69] ? 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.847862][ T69] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 20.848022][ T69] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 20.848184][ T69] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 20.848380][ T69] ? unregister_netdevice_many (net/core/dev.c:12441) [ 20.848536][ T69] ? unregister_netdevice_many (net/core/dev.c:12441) [ 20.848790][ T69] default_device_exit_batch (net/core/dev.c:13229) [ 20.848955][ T69] ? unregister_netdev (net/core/dev.c:13204) [ 20.849117][ T69] ops_undo_list (net/core/net_namespace.c:251) [ 20.849278][ T69] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 20.849439][ T69] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 20.849694][ T69] cleanup_net (net/core/net_namespace.c:698) [ 20.849859][ T69] ? net_passive_dec (net/core/net_namespace.c:660) [ 20.850017][ T69] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 20.850179][ T69] process_one_work (kernel/workqueue.c:3268) [ 20.850339][ T69] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 20.850503][ T69] ? assign_work (kernel/workqueue.c:1206) [ 20.850664][ T69] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 20.850828][ T69] ? rescuer_thread (kernel/workqueue.c:3373) [ 20.850993][ T69] kthread (kernel/kthread.c:463) [ 20.851116][ T69] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 20.851273][ T69] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 20.851434][ T69] ? __lock_release (kernel/locking/lockdep.c:5536) [ 20.851593][ T69] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 20.851757][ T69] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 20.851923][ T69] ret_from_fork (arch/x86/kernel/process.c:164) [ 20.852083][ T69] ? 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