====================================== | [ 19.593527][ T70] ================================================================== | [ 19.593929][ T70] 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.594341][ T70] Write of size 8 at addr 0000000000000000 by task kworker/u16:1/70 | [ 19.594742][ T70] [ 19.594899][ T70] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 19.594903][ T70] Workqueue: netns cleanup_net [ 19.594916][ T70] Call Trace: [ 19.594922][ T70] [ 19.594926][ T70] dump_stack_lvl (lib/dump_stack.c:123) [ 19.594935][ T70] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 19.594940][ T70] kasan_report (mm/kasan/report.c:597) [ 19.594950][ T70] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 19.594959][ T70] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 19.594966][ T70] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 19.594970][ T70] ? irqentry_exit (kernel/entry/common.c:215) [ 19.594977][ T70] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 19.594980][ T70] ? enable_delayed_work (kernel/workqueue.c:4359) [ 19.594986][ T70] ? queue_delayed_work_on (kernel/workqueue.c:2567) [ 19.594990][ T70] __cancel_work_sync (kernel/workqueue.c:4383) [ 19.594994][ T70] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 19.594999][ T70] ? netdev_notify_peers (net/core/dev.c:1891) [ 19.595002][ T70] ? netif_close_many (net/core/dev.c:1959) [ 19.595006][ T70] netif_close_many (net/core/dev.c:1959) [ 19.595009][ T70] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 19.595014][ T70] ? __dev_close_many (net/core/dev.c:1949) [ 19.595017][ T70] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 19.595020][ T70] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 19.595024][ T70] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 19.595028][ T70] ? default_device_exit_batch (net/core/dev.c:13215) [ 19.595033][ T70] ? 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.595036][ T70] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 19.595039][ T70] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 19.595042][ T70] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 19.595045][ T70] ? unregister_netdevice_many (net/core/dev.c:12441) [ 19.595048][ T70] ? unregister_netdevice_many (net/core/dev.c:12441) [ 19.595054][ T70] default_device_exit_batch (net/core/dev.c:13229) [ 19.595058][ T70] ? unregister_netdev (net/core/dev.c:13204) [ 19.595064][ T70] ops_undo_list (net/core/net_namespace.c:251) [ 19.595069][ T70] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 19.595072][ T70] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 19.595078][ T70] cleanup_net (net/core/net_namespace.c:698) [ 19.595082][ T70] ? net_passive_dec (net/core/net_namespace.c:660) [ 19.595087][ T70] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 19.595093][ T70] process_one_work (kernel/workqueue.c:3268) [ 19.595100][ T70] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 19.595105][ T70] ? assign_work (kernel/workqueue.c:1206) [ 19.595110][ T70] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 19.595115][ T70] ? rescuer_thread (kernel/workqueue.c:3373) [ 19.595119][ T70] kthread (kernel/kthread.c:463) [ 19.595124][ T70] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 19.595127][ T70] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 19.595131][ T70] ? __lock_release (kernel/locking/lockdep.c:5536) [ 19.595134][ T70] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 19.595137][ T70] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 19.595141][ T70] ret_from_fork (arch/x86/kernel/process.c:164) [ 19.595143][ T70] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 19.595146][ T70] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 19.611128][ T70] #PF: error_code(0x0002) - not-present page | [ 19.611452][ T70] PGD 0 P4D 0 | [ 19.611654][ T70] Oops: Oops: 0002 [#1] SMP KASAN | [ 19.612541][ T70] Tainted: [B]=BAD_PAGE [ 19.612746][ T70] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 19.613074][ T70] Workqueue: netns cleanup_net [ 19.613354][ T70] 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.613696][ T70] 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.614621][ T70] RSP: 0018:ffffc900004b7680 EFLAGS: 00010046 [ 19.614955][ T70] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff8a049b8a [ 19.615353][ T70] RDX: fffffbfff1dacacd RSI: 0000000000000008 RDI: ffffffff8ed65660 [ 19.615746][ T70] RBP: ffffc900004b76e8 R08: 0000000000000001 R09: fffffbfff1dacacc [ 19.616131][ T70] R10: ffffffff8ed65667 R11: ffffc900004b7140 R12: 0000000000000000 [ 19.616516][ T70] R13: 0000000000000282 R14: ffff88800c5a1000 R15: dffffc0000000000 [ 19.616908][ T70] FS: 0000000000000000(0000) GS:ffff8880de387000(0000) knlGS:0000000000000000 [ 19.617366][ T70] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 19.617695][ T70] CR2: 0000000000000000 CR3: 0000000015749006 CR4: 0000000000772ef0 [ 19.618089][ T70] PKRU: 55555554 [ 19.618328][ T70] Call Trace: [ 19.618522][ T70] [ 19.618676][ T70] ? irqentry_exit (kernel/entry/common.c:215) [ 19.618955][ T70] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 19.619224][ T70] ? enable_delayed_work (kernel/workqueue.c:4359) [ 19.619489][ T70] ? queue_delayed_work_on (kernel/workqueue.c:2567) [ 19.619752][ T70] __cancel_work_sync (kernel/workqueue.c:4383) [ 19.620013][ T70] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 19.620277][ T70] ? netdev_notify_peers (net/core/dev.c:1891) [ 19.620536][ T70] ? netif_close_many (net/core/dev.c:1959) [ 19.620800][ T70] netif_close_many (net/core/dev.c:1959) [ 19.621058][ T70] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 19.621346][ T70] ? __dev_close_many (net/core/dev.c:1949) [ 19.621603][ T70] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 19.621923][ T70] ? trace_contention_end (./include/trace/events/lock.h:122 (discriminator 21)) [ 19.622360][ T70] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 19.622672][ T70] ? default_device_exit_batch (net/core/dev.c:13215) [ 19.622939][ T70] ? 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.623196][ T70] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 19.623574][ T70] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 19.623830][ T70] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 19.624147][ T70] ? unregister_netdevice_many (net/core/dev.c:12441) [ 19.624576][ T70] ? unregister_netdevice_many (net/core/dev.c:12441) [ 19.624847][ T70] default_device_exit_batch (net/core/dev.c:13229) [ 19.625111][ T70] ? unregister_netdev (net/core/dev.c:13204) [ 19.625377][ T70] ops_undo_list (net/core/net_namespace.c:251) [ 19.625813][ T70] ? rtnl_net_dumpid_one (net/core/net_namespace.c:223) [ 19.626034][ T70] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 19.626296][ T70] cleanup_net (net/core/net_namespace.c:698) [ 19.626556][ T70] ? net_passive_dec (net/core/net_namespace.c:660) [ 19.626951][ T70] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 19.627195][ T70] process_one_work (kernel/workqueue.c:3268) [ 19.627475][ T70] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 19.627735][ T70] ? assign_work (kernel/workqueue.c:1206) [ 19.628174][ T70] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 19.628412][ T70] ? rescuer_thread (kernel/workqueue.c:3373) [ 19.628675][ T70] kthread (kernel/kthread.c:463) [ 19.628874][ T70] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 19.629134][ T70] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 19.629511][ T70] ? __lock_release (kernel/locking/lockdep.c:5536) [ 19.629772][ T70] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 19.630031][ T70] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 19.630287][ T70] ret_from_fork (arch/x86/kernel/process.c:164) [ 19.630714][ T70] ? 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