====================================== | [ 23.904521][ T71] ================================================================== | [ 23.904843][ T71] 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) | [ 23.905130][ T71] Write of size 8 at addr 0000000000000000 by task kworker/u16:1/71 | [ 23.905435][ T71] [ 23.905550][ T71] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 23.905553][ T71] Workqueue: netns cleanup_net [ 23.905565][ T71] Call Trace: [ 23.905569][ T71] [ 23.905572][ T71] dump_stack_lvl (lib/dump_stack.c:123) [ 23.905580][ T71] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 23.905584][ T71] kasan_report (mm/kasan/report.c:597) [ 23.905592][ T71] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 23.905598][ T71] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 23.905603][ T71] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 23.905611][ T71] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 23.905616][ T71] ? enable_delayed_work (kernel/workqueue.c:4359) [ 23.905623][ T71] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 23.905628][ T71] __cancel_work_sync (kernel/workqueue.c:4383) [ 23.905632][ T71] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 23.905638][ T71] ? netdev_notify_peers (net/core/dev.c:1891) [ 23.905642][ T71] ? netif_close_many (net/core/dev.c:1959) [ 23.905646][ T71] netif_close_many (net/core/dev.c:1959) [ 23.905649][ T71] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 23.905656][ T71] ? __dev_close_many (net/core/dev.c:1949) [ 23.905659][ T71] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 23.905662][ T71] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 23.905667][ T71] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 23.905671][ T71] ? default_device_exit_batch (net/core/dev.c:13215) [ 23.905676][ T71] ? 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) [ 23.905680][ T71] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 23.905683][ T71] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 23.905688][ T71] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 23.905691][ T71] ? unregister_netdevice_many (net/core/dev.c:12441) [ 23.905694][ T71] ? unregister_netdevice_many (net/core/dev.c:12441) [ 23.905700][ T71] default_device_exit_batch (net/core/dev.c:13229) [ 23.905704][ T71] ? unregister_netdev (net/core/dev.c:13204) [ 23.905710][ T71] ops_undo_list (net/core/net_namespace.c:251) [ 23.905716][ T71] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 23.905719][ T71] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 23.905725][ T71] cleanup_net (net/core/net_namespace.c:698) [ 23.905729][ T71] ? net_passive_dec (net/core/net_namespace.c:660) [ 23.905734][ T71] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 23.905744][ T71] process_one_work (kernel/workqueue.c:3268) [ 23.905751][ T71] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 23.905756][ T71] ? assign_work (kernel/workqueue.c:1206) [ 23.905761][ T71] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 23.905767][ T71] ? rescuer_thread (kernel/workqueue.c:3373) [ 23.905770][ T71] kthread (kernel/kthread.c:463) [ 23.905776][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 23.905779][ T71] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 23.905786][ T71] ? __lock_release (kernel/locking/lockdep.c:5536) [ 23.905790][ T71] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 23.905793][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 23.905797][ T71] ret_from_fork (arch/x86/kernel/process.c:164) [ 23.905800][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 23.905803][ T71] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 23.916347][ T71] #PF: error_code(0x0002) - not-present page | [ 23.916552][ T71] PGD 0 P4D 0 | [ 23.916683][ T71] Oops: Oops: 0002 [#1] SMP KASAN | [ 23.917353][ T71] Tainted: [B]=BAD_PAGE [ 23.917484][ T71] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 23.917697][ T71] Workqueue: netns cleanup_net [ 23.917973][ T71] 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) [ 23.918193][ T71] 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 [ 23.918902][ T71] RSP: 0018:ffffc900004c7680 EFLAGS: 00010046 [ 23.919129][ T71] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffb8a49b8a [ 23.919486][ T71] RDX: fffffbfff7aecacd RSI: 0000000000000008 RDI: ffffffffbd765660 [ 23.919762][ T71] RBP: ffffc900004c76e8 R08: 0000000000000001 R09: fffffbfff7aecacc [ 23.920007][ T71] R10: ffffffffbd765667 R11: ffffc900004c7140 R12: 0000000000000000 [ 23.920376][ T71] R13: 0000000000000282 R14: ffff88800b914000 R15: dffffc0000000000 [ 23.920630][ T71] FS: 0000000000000000(0000) GS:ffff8880a9587000(0000) knlGS:0000000000000000 [ 23.921007][ T71] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 23.921222][ T71] CR2: 0000000000000000 CR3: 000000006b349002 CR4: 0000000000772ef0 [ 23.921474][ T71] PKRU: 55555554 [ 23.921617][ T71] Call Trace: [ 23.921838][ T71] [ 23.921934][ T71] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 23.922110][ T71] ? enable_delayed_work (kernel/workqueue.c:4359) [ 23.922281][ T71] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 23.922446][ T71] __cancel_work_sync (kernel/workqueue.c:4383) [ 23.922705][ T71] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 23.922869][ T71] ? netdev_notify_peers (net/core/dev.c:1891) [ 23.923064][ T71] ? netif_close_many (net/core/dev.c:1959) [ 23.923239][ T71] netif_close_many (net/core/dev.c:1959) [ 23.923497][ T71] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 23.923664][ T71] ? __dev_close_many (net/core/dev.c:1949) [ 23.923825][ T71] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 23.924161][ T71] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 23.924340][ T71] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 23.924609][ T71] ? default_device_exit_batch (net/core/dev.c:13215) [ 23.924785][ T71] ? 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) [ 23.925048][ T71] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 23.925232][ T71] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 23.925424][ T71] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 23.925634][ T71] ? unregister_netdevice_many (net/core/dev.c:12441) [ 23.925902][ T71] ? unregister_netdevice_many (net/core/dev.c:12441) [ 23.926088][ T71] default_device_exit_batch (net/core/dev.c:13229) [ 23.926272][ T71] ? unregister_netdev (net/core/dev.c:13204) [ 23.926436][ T71] ops_undo_list (net/core/net_namespace.c:251) [ 23.926699][ T71] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 23.926858][ T71] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 23.927023][ T71] cleanup_net (net/core/net_namespace.c:698) [ 23.927184][ T71] ? net_passive_dec (net/core/net_namespace.c:660) [ 23.927438][ T71] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 23.927609][ T71] process_one_work (kernel/workqueue.c:3268) [ 23.927776][ T71] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 23.927938][ T71] ? assign_work (kernel/workqueue.c:1206) [ 23.928205][ T71] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 23.928371][ T71] ? rescuer_thread (kernel/workqueue.c:3373) [ 23.928539][ T71] kthread (kernel/kthread.c:463) [ 23.928663][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 23.928915][ T71] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 23.929080][ T71] ? __lock_release (kernel/locking/lockdep.c:5536) [ 23.929261][ T71] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 23.929422][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 23.929692][ T71] ret_from_fork (arch/x86/kernel/process.c:164) [ 23.929856][ T71] ? 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