====================================== | [ 100.315491][ T71] ================================================================== | [ 100.315818][ 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) | [ 100.316109][ T71] Write of size 8 at addr 0000000000000000 by task kworker/u16:1/71 | [ 100.316400][ T71] [ 100.316504][ T71] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 100.316508][ T71] Workqueue: netns cleanup_net [ 100.316518][ T71] Call Trace: [ 100.316520][ T71] [ 100.316523][ T71] dump_stack_lvl (lib/dump_stack.c:123) [ 100.316535][ T71] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 100.316538][ T71] kasan_report (mm/kasan/report.c:597) [ 100.316546][ T71] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 100.316551][ T71] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 100.316555][ T71] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 100.316560][ T71] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 100.316564][ T71] ? enable_delayed_work (kernel/workqueue.c:4359) [ 100.316569][ T71] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 100.316574][ T71] __cancel_work_sync (kernel/workqueue.c:4383) [ 100.316578][ T71] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 100.316587][ T71] ? netdev_notify_peers (net/core/dev.c:1891) [ 100.316591][ T71] ? netif_close_many (net/core/dev.c:1959) [ 100.316598][ T71] netif_close_many (net/core/dev.c:1959) [ 100.316602][ T71] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 100.316609][ T71] ? __dev_close_many (net/core/dev.c:1949) [ 100.316613][ T71] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 100.316618][ T71] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 100.316622][ T71] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 100.316627][ 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) [ 100.316630][ T71] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 100.316633][ T71] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 100.316636][ T71] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 100.316639][ T71] ? unregister_netdevice_many (net/core/dev.c:12441) [ 100.316642][ T71] ? unregister_netdevice_many (net/core/dev.c:12441) [ 100.316647][ T71] default_device_exit_batch (net/core/dev.c:13229) [ 100.316651][ T71] ? unregister_netdev (net/core/dev.c:13204) [ 100.316656][ T71] ops_undo_list (net/core/net_namespace.c:251) [ 100.316661][ T71] ? netns_get (net/core/net_namespace.c:223) [ 100.316664][ T71] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 100.316670][ T71] cleanup_net (net/core/net_namespace.c:698) [ 100.316673][ T71] ? net_passive_dec (net/core/net_namespace.c:660) [ 100.316678][ T71] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 100.316686][ T71] process_one_work (kernel/workqueue.c:3268) [ 100.316693][ T71] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 100.316700][ T71] ? assign_work (kernel/workqueue.c:1206) [ 100.316705][ T71] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 100.316711][ T71] ? rescuer_thread (kernel/workqueue.c:3373) [ 100.316715][ T71] kthread (kernel/kthread.c:463) [ 100.316720][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 100.316723][ T71] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 100.316728][ T71] ? __lock_release (kernel/locking/lockdep.c:5536) [ 100.316731][ T71] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 100.316735][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 100.316738][ T71] ret_from_fork (arch/x86/kernel/process.c:164) [ 100.316741][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 100.316744][ T71] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 100.327744][ T71] #PF: error_code(0x0002) - not-present page | [ 100.328052][ T71] PGD 0 P4D 0 | [ 100.328189][ T71] Oops: Oops: 0002 [#1] SMP KASAN | [ 100.328861][ T71] Tainted: [B]=BAD_PAGE [ 100.328993][ T71] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 100.329216][ T71] Workqueue: netns cleanup_net [ 100.329404][ 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) [ 100.329733][ 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 6f 7d 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 6f 7d 81 00 call 0x817d99 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 [ 100.330455][ T71] RSP: 0018:ffffc900004c7690 EFLAGS: 00010046 [ 100.330678][ T71] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffabc4190a [ 100.330940][ T71] RDX: fffffbfff601cecd RSI: 0000000000000008 RDI: ffffffffb00e7660 [ 100.331305][ T71] RBP: ffffc900004c76f8 R08: 0000000000000001 R09: fffffbfff601cecc [ 100.331566][ T71] R10: ffffffffb00e7667 R11: ffffc900004c7180 R12: 0000000000000000 [ 100.331830][ T71] R13: 0000000000000286 R14: ffff888005464000 R15: dffffc0000000000 [ 100.332207][ T71] FS: 0000000000000000(0000) GS:ffff888086184000(0000) knlGS:0000000000000000 [ 100.332514][ T71] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 100.332831][ T71] CR2: 0000000000000000 CR3: 000000000f656002 CR4: 0000000000772ef0 [ 100.333102][ T71] PKRU: 55555554 [ 100.333236][ T71] Call Trace: [ 100.333372][ T71] [ 100.333479][ T71] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 100.333760][ T71] ? enable_delayed_work (kernel/workqueue.c:4359) [ 100.333938][ T71] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 100.334114][ T71] __cancel_work_sync (kernel/workqueue.c:4383) [ 100.334287][ T71] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 100.334560][ T71] ? netdev_notify_peers (net/core/dev.c:1891) [ 100.334736][ T71] ? netif_close_many (net/core/dev.c:1959) [ 100.334919][ T71] netif_close_many (net/core/dev.c:1959) [ 100.335093][ T71] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 100.335365][ T71] ? __dev_close_many (net/core/dev.c:1949) [ 100.335541][ T71] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 100.335758][ T71] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 100.336068][ T71] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 100.336240][ 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) [ 100.336414][ T71] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 100.336590][ T71] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 100.336885][ T71] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 100.337101][ T71] ? unregister_netdevice_many (net/core/dev.c:12441) [ 100.337273][ T71] ? unregister_netdevice_many (net/core/dev.c:12441) [ 100.337458][ T71] default_device_exit_batch (net/core/dev.c:13229) [ 100.337729][ T71] ? unregister_netdev (net/core/dev.c:13204) [ 100.337915][ T71] ops_undo_list (net/core/net_namespace.c:251) [ 100.338102][ T71] ? netns_get (net/core/net_namespace.c:223) [ 100.338276][ T71] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 100.338550][ T71] cleanup_net (net/core/net_namespace.c:698) [ 100.338725][ T71] ? net_passive_dec (net/core/net_namespace.c:660) [ 100.338897][ T71] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 100.339073][ T71] process_one_work (kernel/workqueue.c:3268) [ 100.339344][ T71] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 100.339520][ T71] ? assign_work (kernel/workqueue.c:1206) [ 100.339699][ T71] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 100.339874][ T71] ? rescuer_thread (kernel/workqueue.c:3373) [ 100.340144][ T71] kthread (kernel/kthread.c:463) [ 100.340289][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 100.340462][ T71] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 100.340636][ T71] ? __lock_release (kernel/locking/lockdep.c:5536) [ 100.340903][ T71] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 100.341084][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 100.341263][ T71] ret_from_fork (arch/x86/kernel/process.c:164) [ 100.341434][ T71] ? kthread_is_per_cpu (kernel/kthread.c:412) Finger prints: try_to_grab_pending:__cancel_work:__cancel_work_sync:__dev_close_many:netif_close_many kasan_report:kasan_check_range:try_to_grab_pending:__cancel_work:__cancel_work_sync