====================================== | [ 19.634655][ T68] ================================================================== | [ 19.634990][ T68] 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) | [ 19.635282][ T68] Write of size 8 at addr 0000000000000000 by task kworker/u16:1/68 | [ 19.635557][ T68] [ 19.635664][ T68] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 19.635667][ T68] Workqueue: netns cleanup_net [ 19.635679][ T68] Call Trace: [ 19.635681][ T68] [ 19.635684][ T68] dump_stack_lvl (lib/dump_stack.c:123) [ 19.635692][ T68] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 19.635696][ T68] kasan_report (mm/kasan/report.c:597) [ 19.635704][ T68] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 19.635710][ T68] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 19.635714][ T68] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 19.635717][ T68] ? irqentry_exit (kernel/entry/common.c:215) [ 19.635725][ T68] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 19.635728][ T68] ? enable_delayed_work (kernel/workqueue.c:4359) [ 19.635734][ T68] ? queue_delayed_work_on (kernel/workqueue.c:2567) [ 19.635739][ T68] __cancel_work_sync (kernel/workqueue.c:4383) [ 19.635743][ T68] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 19.635749][ T68] ? netdev_notify_peers (net/core/dev.c:1891) [ 19.635753][ T68] ? netif_close_many (net/core/dev.c:1959) [ 19.635757][ T68] netif_close_many (net/core/dev.c:1959) [ 19.635760][ T68] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 19.635766][ T68] ? __dev_close_many (net/core/dev.c:1949) [ 19.635769][ T68] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 19.635772][ T68] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 19.635777][ T68] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 19.635781][ T68] ? default_device_exit_batch (net/core/dev.c:13215) [ 19.635786][ T68] ? 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) [ 19.635789][ T68] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 19.635792][ T68] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 19.635797][ T68] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 19.635799][ T68] ? unregister_netdevice_many (net/core/dev.c:12441) [ 19.635803][ T68] ? unregister_netdevice_many (net/core/dev.c:12441) [ 19.635809][ T68] default_device_exit_batch (net/core/dev.c:13229) [ 19.635813][ T68] ? unregister_netdev (net/core/dev.c:13204) [ 19.635819][ T68] ops_undo_list (net/core/net_namespace.c:251) [ 19.635824][ T68] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 19.635828][ T68] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 19.635834][ T68] cleanup_net (net/core/net_namespace.c:698) [ 19.635838][ T68] ? net_passive_dec (net/core/net_namespace.c:660) [ 19.635843][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 19.635850][ T68] process_one_work (kernel/workqueue.c:3268) [ 19.635857][ T68] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 19.635863][ T68] ? assign_work (kernel/workqueue.c:1206) [ 19.635871][ T68] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 19.635880][ T68] ? rescuer_thread (kernel/workqueue.c:3373) [ 19.635885][ T68] kthread (kernel/kthread.c:463) [ 19.635889][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 19.635892][ T68] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 19.635896][ T68] ? __lock_release (kernel/locking/lockdep.c:5536) [ 19.635900][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 19.635903][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 19.635907][ T68] ret_from_fork (arch/x86/kernel/process.c:164) [ 19.635909][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 19.635912][ T68] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 19.647189][ T68] #PF: error_code(0x0002) - not-present page | [ 19.647419][ T68] PGD 0 P4D 0 | [ 19.647564][ T68] Oops: Oops: 0002 [#1] SMP KASAN | [ 19.648182][ T68] Tainted: [B]=BAD_PAGE [ 19.648325][ T68] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 19.648556][ T68] Workqueue: netns cleanup_net [ 19.648765][ T68] 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) [ 19.649023][ T68] 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 [ 19.649690][ T68] RSP: 0018:ffffc90000497680 EFLAGS: 00010046 [ 19.649927][ T68] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff8c049b8a [ 19.650202][ T68] RDX: fffffbfff21acacd RSI: 0000000000000008 RDI: ffffffff90d65660 [ 19.650475][ T68] RBP: ffffc900004976e8 R08: 0000000000000001 R09: fffffbfff21acacc [ 19.650746][ T68] R10: ffffffff90d65667 R11: ffffc90000497140 R12: 0000000000000000 [ 19.651032][ T68] R13: 0000000000000282 R14: ffff88800f469000 R15: dffffc0000000000 [ 19.651298][ T68] FS: 0000000000000000(0000) GS:ffff8880dc387000(0000) knlGS:0000000000000000 [ 19.651618][ T68] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 19.651857][ T68] CR2: 0000000000000000 CR3: 0000000036f49006 CR4: 0000000000772ef0 [ 19.652144][ T68] PKRU: 55555554 [ 19.652281][ T68] Call Trace: [ 19.652418][ T68] [ 19.652515][ T68] ? irqentry_exit (kernel/entry/common.c:215) [ 19.652708][ T68] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 19.652898][ T68] ? enable_delayed_work (kernel/workqueue.c:4359) [ 19.653085][ T68] ? queue_delayed_work_on (kernel/workqueue.c:2567) [ 19.653267][ T68] __cancel_work_sync (kernel/workqueue.c:4383) [ 19.653458][ T68] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 19.653661][ T68] ? netdev_notify_peers (net/core/dev.c:1891) [ 19.653844][ T68] ? netif_close_many (net/core/dev.c:1959) [ 19.654042][ T68] netif_close_many (net/core/dev.c:1959) [ 19.654228][ T68] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 19.654417][ T68] ? __dev_close_many (net/core/dev.c:1949) [ 19.654597][ T68] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 19.654828][ T68] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 19.655042][ T68] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 19.655271][ T68] ? default_device_exit_batch (net/core/dev.c:13215) [ 19.655471][ T68] ? 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) [ 19.655640][ T68] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 19.655806][ T68] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 19.656003][ T68] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 19.656224][ T68] ? unregister_netdevice_many (net/core/dev.c:12441) [ 19.656412][ T68] ? unregister_netdevice_many (net/core/dev.c:12441) [ 19.656592][ T68] default_device_exit_batch (net/core/dev.c:13229) [ 19.656780][ T68] ? unregister_netdev (net/core/dev.c:13204) [ 19.656969][ T68] ops_undo_list (net/core/net_namespace.c:251) [ 19.657154][ T68] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 19.657330][ T68] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 19.657516][ T68] cleanup_net (net/core/net_namespace.c:698) [ 19.657700][ T68] ? net_passive_dec (net/core/net_namespace.c:660) [ 19.657884][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 19.658065][ T68] process_one_work (kernel/workqueue.c:3268) [ 19.658246][ T68] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 19.658431][ T68] ? assign_work (kernel/workqueue.c:1206) [ 19.658613][ T68] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 19.658802][ T68] ? rescuer_thread (kernel/workqueue.c:3373) [ 19.658994][ T68] kthread (kernel/kthread.c:463) [ 19.659134][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 19.659316][ T68] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 19.659505][ T68] ? __lock_release (kernel/locking/lockdep.c:5536) [ 19.659696][ T68] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 19.659883][ T68] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 19.660069][ T68] ret_from_fork (arch/x86/kernel/process.c:164) [ 19.660249][ T68] ? 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