====================================== | [ 13.945788][ T12] ================================================================== | [ 13.946134][ 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) | [ 13.946399][ T12] Write of size 8 at addr 0000000000000000 by task kworker/u16:0/12 | [ 13.946652][ T12] [ 13.946751][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 13.946754][ T12] Workqueue: netns cleanup_net [ 13.946762][ T12] Call Trace: [ 13.946764][ T12] [ 13.946767][ T12] dump_stack_lvl (lib/dump_stack.c:123) [ 13.946775][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 13.946778][ T12] kasan_report (mm/kasan/report.c:597) [ 13.946786][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 13.946791][ T12] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 13.946794][ T12] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 13.946799][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 13.946802][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 13.946807][ T12] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 13.946811][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 13.946815][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 13.946820][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 13.946824][ T12] ? netif_close_many (net/core/dev.c:1959) [ 13.946829][ T12] netif_close_many (net/core/dev.c:1959) [ 13.946832][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 13.946837][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 13.946841][ T12] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 13.946845][ T12] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 13.946851][ T12] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 13.946857][ 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) [ 13.946860][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 13.946864][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 13.946868][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 13.946873][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 13.946879][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 13.946887][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 13.946891][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 13.946897][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 13.946902][ T12] ? netns_get (net/core/net_namespace.c:223) [ 13.946904][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 13.946909][ T12] cleanup_net (net/core/net_namespace.c:698) [ 13.946912][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 13.946916][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 13.946923][ T12] process_one_work (kernel/workqueue.c:3268) [ 13.946929][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 13.946934][ T12] ? assign_work (kernel/workqueue.c:1206) [ 13.946938][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 13.946944][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 13.946947][ T12] kthread (kernel/kthread.c:463) [ 13.946951][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 13.946953][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 13.946961][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 13.946966][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 13.946969][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 13.946973][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 13.946976][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 13.946979][ T12] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 13.956815][ T12] #PF: error_code(0x0002) - not-present page | [ 13.957035][ T12] PGD 0 P4D 0 | [ 13.957163][ T12] Oops: Oops: 0002 [#1] SMP KASAN | [ 13.957702][ T12] Tainted: [B]=BAD_PAGE [ 13.957826][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 13.958055][ T12] Workqueue: netns cleanup_net [ 13.958234][ 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) [ 13.958446][ 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 7f 7f 81 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 7f 7f 81 00 call 0x817fa9 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 [ 13.959045][ T12] RSP: 0018:ffffc900000c7690 EFLAGS: 00010046 [ 13.959257][ T12] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffaec3f90a [ 13.959501][ T12] RDX: fffffbfff65cb6cd RSI: 0000000000000008 RDI: ffffffffb2e5b660 [ 13.959752][ T12] RBP: ffffc900000c76f8 R08: 0000000000000001 R09: fffffbfff65cb6cc [ 13.960077][ T12] R10: ffffffffb2e5b667 R11: ffffc900000c7180 R12: 0000000000000000 [ 13.960360][ T12] R13: 0000000000000286 R14: ffff888009404000 R15: dffffc0000000000 [ 13.960632][ T12] FS: 0000000000000000(0000) GS:ffff88807d890000(0000) knlGS:0000000000000000 [ 13.960945][ T12] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 13.961159][ T12] CR2: 0000000000000000 CR3: 000000000c762006 CR4: 0000000000772ef0 [ 13.961410][ T12] PKRU: 55555554 [ 13.961574][ T12] Call Trace: [ 13.961708][ T12] [ 13.961806][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 13.962003][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 13.962194][ T12] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 13.962373][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 13.962552][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 13.962734][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 13.962922][ T12] ? netif_close_many (net/core/dev.c:1959) [ 13.963111][ T12] netif_close_many (net/core/dev.c:1959) [ 13.963289][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 13.963480][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 13.963658][ T12] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 13.963886][ T12] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 13.964116][ T12] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 13.964298][ 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) [ 13.964485][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 13.964661][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 13.964844][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 13.965079][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 13.965260][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 13.965445][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 13.965632][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 13.965822][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 13.966022][ T12] ? netns_get (net/core/net_namespace.c:223) [ 13.966219][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 13.966410][ T12] cleanup_net (net/core/net_namespace.c:698) [ 13.966595][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 13.966775][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 13.966972][ T12] process_one_work (kernel/workqueue.c:3268) [ 13.967164][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 13.967347][ T12] ? assign_work (kernel/workqueue.c:1206) [ 13.967531][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 13.967712][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 13.967910][ T12] kthread (kernel/kthread.c:463) [ 13.968055][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 13.968235][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 13.968425][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 13.968611][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 13.968793][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 13.968985][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 13.969170][ 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