====================================== | [ 46.278928][ T12] ================================================================== | [ 46.279249][ 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) | [ 46.279538][ T12] Write of size 8 at addr 0000000000000000 by task kworker/u16:0/12 | [ 46.279781][ T12] [ 46.279880][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 46.279884][ T12] Workqueue: netns cleanup_net [ 46.279900][ T12] Call Trace: [ 46.279903][ T12] [ 46.279906][ T12] dump_stack_lvl (lib/dump_stack.c:123) [ 46.279916][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 46.279919][ T12] kasan_report (mm/kasan/report.c:597) [ 46.279931][ T12] ? try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 46.279935][ T12] kasan_check_range (mm/kasan/generic.c:194 mm/kasan/generic.c:200) [ 46.279940][ T12] try_to_grab_pending (./arch/x86/include/asm/bitops.h:136 ./include/asm-generic/bitops/instrumented-atomic.h:72 kernel/workqueue.c:2072) [ 46.279945][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 46.279948][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 46.279953][ T12] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 46.279958][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 46.279964][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 46.279973][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 46.279979][ T12] ? netif_close_many (net/core/dev.c:1959) [ 46.279983][ T12] netif_close_many (net/core/dev.c:1959) [ 46.279986][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 46.279994][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 46.279997][ T12] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 46.280002][ T12] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 46.280009][ T12] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 46.280015][ 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) [ 46.280019][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 46.280024][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 46.280030][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 46.280033][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 46.280036][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 46.280042][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 46.280046][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 46.280052][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 46.280061][ T12] ? netns_get (net/core/net_namespace.c:223) [ 46.280064][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 46.280069][ T12] cleanup_net (net/core/net_namespace.c:698) [ 46.280072][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 46.280075][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 46.280085][ T12] process_one_work (kernel/workqueue.c:3268) [ 46.280091][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 46.280096][ T12] ? assign_work (kernel/workqueue.c:1206) [ 46.280100][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 46.280106][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 46.280109][ T12] kthread (kernel/kthread.c:463) [ 46.280115][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 46.280117][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 46.280129][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 46.280133][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 46.280136][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 46.280139][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 46.280142][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 46.280145][ T12] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) | [ 46.290016][ T12] #PF: error_code(0x0002) - not-present page | [ 46.290317][ T12] PGD 0 P4D 0 | [ 46.290442][ T12] Oops: Oops: 0002 [#1] SMP KASAN | [ 46.291082][ T12] Tainted: [B]=BAD_PAGE [ 46.291206][ T12] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 46.291412][ T12] Workqueue: netns cleanup_net [ 46.291589][ 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) [ 46.291895][ 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 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 [ 46.292594][ T12] RSP: 0018:ffffc900000c7690 EFLAGS: 00010046 [ 46.292800][ T12] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffa7c40aaa [ 46.293060][ T12] RDX: fffffbfff57cfecd RSI: 0000000000000008 RDI: ffffffffabe7f660 [ 46.293303][ T12] RBP: ffffc900000c76f8 R08: 0000000000000001 R09: fffffbfff57cfecc [ 46.293548][ T12] R10: ffffffffabe7f667 R11: ffffc900000c7180 R12: 0000000000000000 [ 46.293790][ T12] R13: 0000000000000286 R14: ffff8880088c9000 R15: dffffc0000000000 [ 46.294140][ T12] FS: 0000000000000000(0000) GS:ffff88808a46c000(0000) knlGS:0000000000000000 [ 46.294423][ T12] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 46.294739][ T12] CR2: 0000000000000000 CR3: 000000000bf97001 CR4: 0000000000772ef0 [ 46.294988][ T12] PKRU: 55555554 [ 46.295121][ T12] Call Trace: [ 46.295239][ T12] [ 46.295333][ T12] __cancel_work (kernel/workqueue.c:2161 kernel/workqueue.c:4364) [ 46.295602][ T12] ? enable_delayed_work (kernel/workqueue.c:4359) [ 46.295763][ T12] ? queue_delayed_work_on (kernel/workqueue.c:2565 (discriminator 1)) [ 46.295924][ T12] __cancel_work_sync (kernel/workqueue.c:4383) [ 46.296099][ T12] __dev_close_many (net/core/dev.c:1879 (discriminator 2) net/core/dev.c:1932 (discriminator 2)) [ 46.296360][ T12] ? netdev_notify_peers (net/core/dev.c:1891) [ 46.296531][ T12] ? netif_close_many (net/core/dev.c:1959) [ 46.296690][ T12] netif_close_many (net/core/dev.c:1959) [ 46.296847][ T12] ? __mutex_handoff (kernel/locking/mutex.c:88) [ 46.297118][ T12] ? __dev_close_many (net/core/dev.c:1949) [ 46.297283][ T12] ? netif_close_many_and_unlock (net/core/dev.c:12476) [ 46.297489][ T12] unregister_netdevice_many_notify (net/core/dev.c:12545) [ 46.297780][ T12] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 46.297939][ 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) [ 46.298115][ T12] ? dev_ingress_queue_create (net/core/dev.c:12499) [ 46.298279][ T12] ? rtnl_is_locked (net/core/rtnetlink.c:169) [ 46.298541][ T12] ? unregister_netdevice_queue (net/core/dev.c:12442) [ 46.298738][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 46.298896][ T12] ? unregister_netdevice_many (net/core/dev.c:12441) [ 46.299066][ T12] default_device_exit_batch (net/core/dev.c:13229) [ 46.299325][ T12] ? unregister_netdev (net/core/dev.c:13204) [ 46.299497][ T12] ops_undo_list (net/core/net_namespace.c:251) [ 46.299658][ T12] ? netns_get (net/core/net_namespace.c:223) [ 46.299815][ T12] ? cleanup_net (./include/linux/list.h:191 net/core/net_namespace.c:693) [ 46.300083][ T12] cleanup_net (net/core/net_namespace.c:698) [ 46.300239][ T12] ? net_passive_dec (net/core/net_namespace.c:660) [ 46.300404][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 46.300569][ T12] process_one_work (kernel/workqueue.c:3268) [ 46.300823][ T12] ? pwq_dec_nr_in_flight (kernel/workqueue.c:3165) [ 46.300997][ T12] ? assign_work (kernel/workqueue.c:1206) [ 46.301165][ T12] worker_thread (kernel/workqueue.c:3340 kernel/workqueue.c:3427) [ 46.301331][ T12] ? rescuer_thread (kernel/workqueue.c:3373) [ 46.301593][ T12] kthread (kernel/kthread.c:463) [ 46.301714][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 46.301871][ T12] ? ret_from_fork (arch/x86/kernel/process.c:157) [ 46.302048][ T12] ? __lock_release (kernel/locking/lockdep.c:5536) [ 46.302207][ T12] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 46.302377][ T12] ? kthread_is_per_cpu (kernel/kthread.c:412) [ 46.302541][ T12] ret_from_fork (arch/x86/kernel/process.c:164) [ 46.302698][ 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