====================================== | [ 25.829024][ T12] ================================================================== | [ 25.829353][ 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) | [ 25.829618][ T12] Write of size 8 at addr 0000000000000000 by task kworker/u16:0/12 | [ 25.829882][ T12] [ 25.829978][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 25.829981][ T12] Workqueue: netns cleanup_net [ 25.829989][ T12] Call Trace: [ 25.829991][ T12] [ 25.829993][ T12] dump_stack_lvl (lib/dump_stack.c:123) [ 25.829999][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 25.830003][ T12] kasan_report (mm/kasan/report.c:597) [ 25.830010][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 25.830015][ T12] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 25.830019][ T12] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 25.830022][ T12] ? irqentry_exit (kernel/entry/common.c:215) [ 25.830029][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 25.830032][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 25.830038][ T12] ? queue_delayed_work_on (kernel/workqueue.c:2567) [ 25.830042][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 25.830046][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 25.830052][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 25.830055][ T12] ? netif_close_many (net/core/dev.c:1959) [ 25.830059][ T12] netif_close_many (net/core/dev.c:1959) [ 25.830063][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 25.830068][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 25.830071][ T12] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 25.830074][ T12] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 25.830079][ T12] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 25.830083][ T12] ? default_device_exit_batch (net/core/dev.c:13215) [ 25.830087][ 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) [ 25.830091][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 25.830094][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 25.830098][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 25.830101][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 25.830104][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 25.830110][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 25.830114][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 25.830120][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 25.830125][ T12] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 25.830129][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 25.830135][ T12] cleanup_net (net/core/net_namespace.c:698) [ 25.830139][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 25.830144][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 25.830150][ T12] process_one_work (kernel/workqueue.c:3268) [ 25.830156][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 25.830162][ T12] ? assign_work (kernel/workqueue.c:1206) [ 25.830166][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 25.830172][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 25.830176][ T12] kthread (kernel/kthread.c:463) [ 25.830180][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 25.830183][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 25.830187][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 25.830190][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 25.830194][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 25.830197][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 25.830200][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 25.830203][ T12] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 25.840439][ T12] #PF: error_code(0x0002) - not-present page | [ 25.840643][ T12] PGD 0 P4D 0 | [ 25.840773][ T12] Oops: Oops: 0002 [#1] SMP KASAN | [ 25.841324][ T12] Tainted: [B]=BAD_PAGE [ 25.841456][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 25.841669][ T12] Workqueue: netns cleanup_net [ 25.841851][ 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) [ 25.842069][ 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 [ 25.842671][ T12] RSP: 0018:ffffc900000c7680 EFLAGS: 00010046 [ 25.842887][ T12] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffaee49b8a [ 25.843137][ T12] RDX: fffffbfff676cacd RSI: 0000000000000008 RDI: ffffffffb3b65660 [ 25.843387][ T12] RBP: ffffc900000c76e8 R08: 0000000000000001 R09: fffffbfff676cacc [ 25.843636][ T12] R10: ffffffffb3b65667 R11: ffffc900000c7140 R12: 0000000000000000 [ 25.843884][ T12] R13: 0000000000000282 R14: ffff888008009000 R15: dffffc0000000000 [ 25.844134][ T12] FS: 0000000000000000(0000) GS:ffff8880b9587000(0000) knlGS:0000000000000000 [ 25.844427][ T12] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 25.844639][ T12] CR2: 0000000000000000 CR3: 000000004a949006 CR4: 0000000000772ef0 [ 25.844889][ T12] PKRU: 55555554 [ 25.845018][ T12] Call Trace: [ 25.845175][ T12] [ 25.845263][ T12] ? irqentry_exit (kernel/entry/common.c:215) [ 25.845439][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 25.845611][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 25.845788][ T12] ? queue_delayed_work_on (kernel/workqueue.c:2567) [ 25.845976][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 25.846175][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 25.846346][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 25.846515][ T12] ? netif_close_many (net/core/dev.c:1959) [ 25.846681][ T12] netif_close_many (net/core/dev.c:1959) [ 25.846846][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 25.847037][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 25.847223][ T12] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 25.847431][ T12] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 25.847605][ T12] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 25.847811][ T12] ? default_device_exit_batch (net/core/dev.c:13215) [ 25.847978][ 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) [ 25.848184][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 25.848358][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 25.848527][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 25.848732][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 25.848914][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 25.849083][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 25.849253][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 25.849421][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 25.849590][ T12] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 25.849754][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 25.849926][ T12] cleanup_net (net/core/net_namespace.c:698) [ 25.850097][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 25.850264][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 25.850431][ T12] process_one_work (kernel/workqueue.c:3268) [ 25.850602][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 25.850772][ T12] ? assign_work (kernel/workqueue.c:1206) [ 25.850941][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 25.851132][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 25.851303][ T12] kthread (kernel/kthread.c:463) [ 25.851430][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 25.851603][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 25.851778][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 25.851971][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 25.852139][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 25.852309][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 25.852480][ 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