====================================== | [ 893.910546][ T12] ================================================================== | [ 893.910959][ 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) | [ 893.911297][ T12] Write of size 8 at addr 0000000000000000 by task kworker/u16:0/12 | [ 893.911596][ T12] [ 893.911721][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 893.911725][ T12] Workqueue: netns cleanup_net [ 893.911745][ T12] Call Trace: [ 893.911749][ T12] [ 893.911752][ T12] dump_stack_lvl (lib/dump_stack.c:123) [ 893.911766][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 893.911771][ T12] kasan_report (mm/kasan/report.c:597) [ 893.911786][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 893.911792][ T12] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 893.911796][ T12] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 893.911801][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 893.911805][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 893.911810][ T12] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 893.911815][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 893.911820][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 893.911826][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 893.911833][ T12] ? netif_close_many (net/core/dev.c:1959) [ 893.911839][ T12] netif_close_many (net/core/dev.c:1959) [ 893.911843][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 893.911854][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 893.911857][ T12] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 893.911860][ T12] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 893.911864][ T12] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 893.911870][ T12] ? default_device_exit_batch (net/core/dev.c:13215) [ 893.911875][ 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) [ 893.911879][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 893.911882][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 893.911887][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 893.911892][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 893.911897][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 893.911907][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 893.911911][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 893.911917][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 893.911923][ T12] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 893.911926][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 893.911932][ T12] cleanup_net (net/core/net_namespace.c:698) [ 893.911937][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 893.911942][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 893.911949][ T12] process_one_work (kernel/workqueue.c:3268) [ 893.911956][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 893.911962][ T12] ? assign_work (kernel/workqueue.c:1206) [ 893.911966][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 893.911973][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 893.911977][ T12] kthread (kernel/kthread.c:463) [ 893.911982][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 893.911985][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 893.911996][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 893.912000][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 893.912004][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 893.912007][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 893.912010][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 893.912013][ T12] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 893.923247][ T12] #PF: error_code(0x0002) - not-present page | [ 893.923485][ T12] PGD 0 P4D 0 | [ 893.923643][ T12] Oops: Oops: 0002 [#1] SMP KASAN | [ 893.924287][ T12] Tainted: [B]=BAD_PAGE [ 893.924429][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 893.924695][ T12] Workqueue: netns cleanup_net [ 893.924933][ 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) [ 893.925177][ 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 [ 893.925877][ T12] RSP: 0018:ffffc900000c7680 EFLAGS: 00010046 [ 893.926116][ T12] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff8c449b8a [ 893.926400][ T12] RDX: fffffbfff222cacd RSI: 0000000000000008 RDI: ffffffff91165660 [ 893.926708][ T12] RBP: ffffc900000c76e8 R08: 0000000000000001 R09: fffffbfff222cacc [ 893.927113][ T12] R10: ffffffff91165667 R11: ffffc900000c7140 R12: 0000000000000000 [ 893.927392][ T12] R13: 0000000000000282 R14: ffff888009384000 R15: dffffc0000000000 [ 893.927696][ T12] FS: 0000000000000000(0000) GS:ffff8880d5a07000(0000) knlGS:0000000000000000 [ 893.928133][ T12] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 893.928377][ T12] CR2: 0000000000000000 CR3: 000000007c749001 CR4: 0000000000772ef0 [ 893.928691][ T12] PKRU: 55555554 [ 893.929048][ T12] Call Trace: [ 893.929187][ T12] [ 893.929282][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 893.929472][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 893.929689][ T12] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 893.929997][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 893.930181][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 893.930364][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 893.930565][ T12] ? netif_close_many (net/core/dev.c:1959) [ 893.930877][ T12] netif_close_many (net/core/dev.c:1959) [ 893.931060][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 893.931303][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 893.931619][ T12] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 893.931879][ T12] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 893.932072][ T12] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 893.932299][ T12] ? default_device_exit_batch (net/core/dev.c:13215) [ 893.932495][ 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) [ 893.932705][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 893.932888][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 893.933066][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 893.933282][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 893.933461][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 893.933651][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 893.933821][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 893.934108][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 893.934276][ T12] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 893.934456][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 893.934656][ T12] cleanup_net (net/core/net_namespace.c:698) [ 893.934959][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 893.935152][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 893.935321][ T12] process_one_work (kernel/workqueue.c:3268) [ 893.935562][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 893.935854][ T12] ? assign_work (kernel/workqueue.c:1206) [ 893.936040][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 893.936234][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 893.936403][ T12] kthread (kernel/kthread.c:463) [ 893.936686][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 893.936909][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 893.937102][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 893.937273][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 893.937566][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 893.937772][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 893.937997][ 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