====================================== | [ 36.839812][ T69] ================================================================== | [ 36.840150][ T69] 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) | [ 36.840459][ T69] Write of size 8 at addr 0000000000000000 by task kworker/u16:1/69 | [ 36.840767][ T69] [ 36.840879][ T69] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 36.840881][ T69] Workqueue: netns cleanup_net [ 36.840889][ T69] Call Trace: [ 36.840891][ T69] [ 36.840894][ T69] dump_stack_lvl (lib/dump_stack.c:123) [ 36.840901][ T69] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 36.840904][ T69] kasan_report (mm/kasan/report.c:597) [ 36.840912][ T69] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 36.840917][ T69] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 36.840921][ T69] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 36.840926][ T69] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 36.840929][ T69] ? enable_delayed_work (kernel/workqueue.c:4359) [ 36.840934][ T69] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 36.840938][ T69] __cancel_work_sync (kernel/workqueue.c:4383) [ 36.840942][ T69] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 36.840947][ T69] ? netdev_notify_peers (net/core/dev.c:1891) [ 36.840951][ T69] ? netif_close_many (net/core/dev.c:1959) [ 36.840955][ T69] netif_close_many (net/core/dev.c:1959) [ 36.840958][ T69] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 36.840965][ T69] ? __dev_close_many (net/core/dev.c:1949) [ 36.840968][ T69] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 36.840972][ T69] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 36.840977][ T69] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 36.840981][ T69] ? 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) [ 36.840984][ T69] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 36.840987][ T69] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 36.840992][ T69] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 36.840995][ T69] ? unregister_netdevice_many (net/core/dev.c:12441) [ 36.840998][ T69] ? unregister_netdevice_many (net/core/dev.c:12441) [ 36.841004][ T69] default_device_exit_batch (net/core/dev.c:13229) [ 36.841008][ T69] ? unregister_netdev (net/core/dev.c:13204) [ 36.841014][ T69] ops_undo_list (net/core/net_namespace.c:251) [ 36.841022][ T69] ? netns_get (net/core/net_namespace.c:223) [ 36.841025][ T69] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 36.841030][ T69] cleanup_net (net/core/net_namespace.c:698) [ 36.841033][ T69] ? net_passive_dec (net/core/net_namespace.c:660) [ 36.841037][ T69] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 36.841044][ T69] process_one_work (kernel/workqueue.c:3268) [ 36.841049][ T69] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 36.841055][ T69] ? assign_work (kernel/workqueue.c:1206) [ 36.841059][ T69] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 36.841064][ T69] ? rescuer_thread (kernel/workqueue.c:3373) [ 36.841067][ T69] kthread (kernel/kthread.c:463) [ 36.841072][ T69] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 36.841075][ T69] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 36.841082][ T69] ? __lock_release (kernel/locking/lockdep.c:5536) [ 36.841086][ T69] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 36.841089][ T69] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 36.841092][ T69] ret_from_fork (arch/x86/kernel/process.c:164) [ 36.841095][ T69] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 36.841098][ T69] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 36.853035][ T69] #PF: error_code(0x0002) - not-present page | [ 36.853279][ T69] PGD 0 P4D 0 | [ 36.853426][ T69] Oops: Oops: 0002 [#1] SMP KASAN | [ 36.854150][ T69] Tainted: [B]=BAD_PAGE [ 36.854294][ T69] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 36.854539][ T69] Workqueue: netns cleanup_net [ 36.854839][ T69] 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) [ 36.855090][ T69] 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 df 81 84 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 df 81 84 00 call 0x848209 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 [ 36.855865][ T69] RSP: 0018:ffffc900004a7690 EFLAGS: 00010046 [ 36.856107][ T69] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9e040aaa [ 36.856494][ T69] RDX: fffffbfff444fecd RSI: 0000000000000008 RDI: ffffffffa227f660 [ 36.856780][ T69] RBP: ffffc900004a76f8 R08: 0000000000000001 R09: fffffbfff444fecc [ 36.857068][ T69] R10: ffffffffa227f667 R11: ffffc900004a7180 R12: 0000000000000000 [ 36.857448][ T69] R13: 0000000000000286 R14: ffff88800a9ac000 R15: dffffc0000000000 [ 36.857737][ T69] FS: 0000000000000000(0000) GS:ffff88808e46c000(0000) knlGS:0000000000000000 [ 36.858076][ T69] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 36.858416][ T69] CR2: 0000000000000000 CR3: 0000000038335005 CR4: 0000000000772ef0 [ 36.858713][ T69] PKRU: 55555554 [ 36.858854][ T69] Call Trace: [ 36.858995][ T69] [ 36.859095][ T69] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 36.859288][ T69] ? enable_delayed_work (kernel/workqueue.c:4359) [ 36.859482][ T69] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 36.859673][ T69] __cancel_work_sync (kernel/workqueue.c:4383) [ 36.859968][ T69] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 36.860144][ T69] ? netdev_notify_peers (net/core/dev.c:1891) [ 36.860321][ T69] ? netif_close_many (net/core/dev.c:1959) [ 36.860497][ T69] netif_close_many (net/core/dev.c:1959) [ 36.860771][ T69] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 36.860952][ T69] ? __dev_close_many (net/core/dev.c:1949) [ 36.861124][ T69] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 36.861342][ T69] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 36.861651][ T69] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 36.861829][ T69] ? 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) [ 36.862004][ T69] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 36.862272][ T69] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 36.862446][ T69] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 36.862665][ T69] ? unregister_netdevice_many (net/core/dev.c:12441) [ 36.862839][ T69] ? unregister_netdevice_many (net/core/dev.c:12441) [ 36.863020][ T69] default_device_exit_batch (net/core/dev.c:13229) [ 36.863198][ T69] ? unregister_netdev (net/core/dev.c:13204) [ 36.863375][ T69] ops_undo_list (net/core/net_namespace.c:251) [ 36.863551][ T69] ? netns_get (net/core/net_namespace.c:223) [ 36.863818][ T69] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 36.864027][ T69] cleanup_net (net/core/net_namespace.c:698) [ 36.864219][ T69] ? net_passive_dec (net/core/net_namespace.c:660) [ 36.864391][ T69] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 36.864660][ T69] process_one_work (kernel/workqueue.c:3268) [ 36.864837][ T69] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 36.865023][ T69] ? assign_work (kernel/workqueue.c:1206) [ 36.865197][ T69] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 36.865468][ T69] ? rescuer_thread (kernel/workqueue.c:3373) [ 36.865641][ T69] kthread (kernel/kthread.c:463) [ 36.865774][ T69] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 36.865948][ T69] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 36.866218][ T69] ? __lock_release (kernel/locking/lockdep.c:5536) [ 36.866396][ T69] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 36.866570][ T69] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 36.866743][ T69] ret_from_fork (arch/x86/kernel/process.c:164) [ 36.867016][ T69] ? 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