====================================== | [ 15.444428][ T12] ================================================================== | [ 15.444806][ 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) | [ 15.445111][ T12] Write of size 8 at addr 0000000000000000 by task kworker/u16:0/12 | [ 15.445404][ T12] [ 15.445513][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 15.445516][ T12] Workqueue: netns cleanup_net [ 15.445525][ T12] Call Trace: [ 15.445528][ T12] [ 15.445531][ T12] dump_stack_lvl (lib/dump_stack.c:123) [ 15.445537][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 15.445540][ T12] kasan_report (mm/kasan/report.c:597) [ 15.445548][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 15.445553][ T12] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 15.445556][ T12] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 15.445558][ T12] ? netif_close_many (net/core/dev.c:1959) [ 15.445562][ T12] ? unregister_netdevice_many_notify (net/core/dev.c:12545) [ 15.445568][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 15.445571][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 15.445576][ T12] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 15.445580][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 15.445583][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 15.445587][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 15.445590][ T12] ? netif_close_many (net/core/dev.c:1959) [ 15.445595][ T12] netif_close_many (net/core/dev.c:1959) [ 15.445598][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 15.445602][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 15.445605][ T12] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 15.445610][ T12] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 15.445614][ T12] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 15.445619][ 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) [ 15.445621][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 15.445625][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 15.445628][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 15.445631][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 15.445634][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 15.445641][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 15.445644][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 15.445650][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 15.445655][ T12] ? netns_get (net/core/net_namespace.c:223) [ 15.445657][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 15.445662][ T12] cleanup_net (net/core/net_namespace.c:698) [ 15.445665][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 15.445669][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 15.445674][ T12] process_one_work (kernel/workqueue.c:3268) [ 15.445680][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 15.445685][ T12] ? assign_work (kernel/workqueue.c:1206) [ 15.445689][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 15.445695][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 15.445698][ T12] kthread (kernel/kthread.c:463) [ 15.445701][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 15.445704][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 15.445709][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 15.445713][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 15.445715][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 15.445718][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 15.445721][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 15.445724][ T12] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 15.457081][ T12] #PF: error_code(0x0002) - not-present page | [ 15.457346][ T12] PGD 0 P4D 0 | [ 15.457506][ T12] Oops: Oops: 0002 [#1] SMP KASAN | [ 15.458112][ T12] Tainted: [B]=BAD_PAGE [ 15.458259][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 15.458487][ T12] Workqueue: netns cleanup_net [ 15.458709][ 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) [ 15.458988][ 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 [ 15.459726][ T12] RSP: 0018:ffffc900000c7690 EFLAGS: 00010046 [ 15.459989][ T12] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff86e3f90a [ 15.460272][ T12] RDX: fffffbfff160b6cd RSI: 0000000000000008 RDI: ffffffff8b05b660 [ 15.460557][ T12] RBP: ffffc900000c76f8 R08: 0000000000000001 R09: fffffbfff160b6cc [ 15.460850][ T12] R10: ffffffff8b05b667 R11: ffffc900000c7180 R12: 0000000000000000 [ 15.461136][ T12] R13: 0000000000000286 R14: ffff88800514c000 R15: dffffc0000000000 [ 15.461435][ T12] FS: 0000000000000000(0000) GS:ffff8880ab310000(0000) knlGS:0000000000000000 [ 15.461780][ T12] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 15.462032][ T12] CR2: 0000000000000000 CR3: 000000000e3b8005 CR4: 0000000000772ef0 [ 15.462313][ T12] PKRU: 55555554 [ 15.462453][ T12] Call Trace: [ 15.462609][ T12] [ 15.462705][ T12] ? netif_close_many (net/core/dev.c:1959) [ 15.462913][ T12] ? unregister_netdevice_many_notify (net/core/dev.c:12545) [ 15.463152][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 15.463342][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 15.463538][ T12] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 15.463748][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 15.463954][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 15.464160][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 15.464353][ T12] ? netif_close_many (net/core/dev.c:1959) [ 15.464560][ T12] netif_close_many (net/core/dev.c:1959) [ 15.464760][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 15.464960][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 15.465144][ T12] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 15.465372][ T12] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 15.465644][ T12] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 15.465848][ 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) [ 15.466046][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 15.466244][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 15.466440][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 15.466699][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 15.466908][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 15.467120][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 15.467317][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 15.467503][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 15.467703][ T12] ? netns_get (net/core/net_namespace.c:223) [ 15.467901][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 15.468106][ T12] cleanup_net (net/core/net_namespace.c:698) [ 15.468289][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 15.468514][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 15.468713][ T12] process_one_work (kernel/workqueue.c:3268) [ 15.468959][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 15.469137][ T12] ? assign_work (kernel/workqueue.c:1206) [ 15.469310][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 15.469518][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 15.469709][ T12] kthread (kernel/kthread.c:463) [ 15.469860][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 15.470050][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 15.470249][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 15.470439][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 15.470632][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 15.470831][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 15.471035][ 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