syzbot


possible deadlock in hrtimer_run_queues

Status: auto-obsoleted due to no activity on 2024/11/06 21:34
Reported-by: syzbot+6cd97514181bfcd46a5c@syzkaller.appspotmail.com
First crash: 261d, last: 125d
Fix bisection: the issue occurs on the latest tested release (bisect log)
  
Bug presence (1)
Date Name Commit Repro Result
2024/04/27 upstream (ToT) 2c8159388952 C Didn't crash
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 possible deadlock in hrtimer_run_queues C done 20 236d 262d 3/3 fixed on 2024/05/11 07:50
upstream possible deadlock in hrtimer_run_queues net bpf C error 592 220d 257d 25/28 fixed on 2024/05/22 23:36
Fix bisection attempts (4)
Created Duration User Patch Repo Result
2024/09/01 06:37 1h36m bisect fix linux-6.1.y OK (0) job log
2024/07/29 18:32 3h00m bisect fix linux-6.1.y OK (0) job log log
2024/06/12 12:28 2h15m bisect fix linux-6.1.y OK (0) job log log
2024/05/13 09:26 2h08m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
=====================================================
WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected
6.1.84-syzkaller #0 Not tainted
-----------------------------------------------------
syz-executor349/3552 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire:
ffff88807c402d68 (&htab->buckets[i].lock){+.-.}-{2:2}, at: sock_hash_delete_elem+0xac/0x2f0 net/core/sock_map.c:932

and this task is already holding:
ffff8880b992a4d8 (hrtimer_bases.lock){-.-.}-{2:2}, at: lock_hrtimer_base kernel/time/hrtimer.c:173 [inline]
ffff8880b992a4d8 (hrtimer_bases.lock){-.-.}-{2:2}, at: hrtimer_start_range_ns+0xd8/0xc50 kernel/time/hrtimer.c:1297
which would create a new lock dependency:
 (hrtimer_bases.lock){-.-.}-{2:2} -> (&htab->buckets[i].lock){+.-.}-{2:2}

but this new dependency connects a HARDIRQ-irq-safe lock:
 (hrtimer_bases.lock){-.-.}-{2:2}

... which became HARDIRQ-irq-safe at:
  lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
  __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
  _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
  hrtimer_run_queues+0x181/0x450 kernel/time/hrtimer.c:1916
  run_local_timers kernel/time/timer.c:1845 [inline]
  update_process_times+0x7b/0x1b0 kernel/time/timer.c:1868
  tick_periodic+0x197/0x210 kernel/time/tick-common.c:100
  tick_handle_periodic+0x46/0x150 kernel/time/tick-common.c:112
  timer_interrupt+0x4d/0x60 arch/x86/kernel/time.c:57
  __handle_irq_event_percpu+0x2a8/0xb20 kernel/irq/handle.c:158
  handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
  handle_irq_event+0x85/0x1e0 kernel/irq/handle.c:210
  handle_level_irq+0x3ab/0x6c0 kernel/irq/chip.c:650
  generic_handle_irq_desc include/linux/irqdesc.h:158 [inline]
  handle_irq arch/x86/kernel/irq.c:231 [inline]
  __common_interrupt+0xd7/0x1f0 arch/x86/kernel/irq.c:250
  common_interrupt+0x9f/0xc0 arch/x86/kernel/irq.c:240
  asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:644
  __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
  _raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194
  __setup_irq+0x12fa/0x1d80 kernel/irq/manage.c:1809
  request_threaded_irq+0x2a7/0x380 kernel/irq/manage.c:2198
  request_irq include/linux/interrupt.h:168 [inline]
  setup_default_timer_irq+0x1f/0x30 arch/x86/kernel/time.c:70
  x86_late_time_init+0x51/0x86 arch/x86/kernel/time.c:94
  start_kernel+0x414/0x53f init/main.c:1102
  secondary_startup_64_no_verify+0xcf/0xdb

to a HARDIRQ-irq-unsafe lock:
 (&htab->buckets[i].lock){+.-.}-{2:2}

... which became HARDIRQ-irq-unsafe at:
...
  lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
  __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
  _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
  sock_hash_delete_elem+0xac/0x2f0 net/core/sock_map.c:932
  bpf_prog_a8aaa52f2e199321+0x46/0x46
  bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline]
  __bpf_prog_run include/linux/filter.h:603 [inline]
  bpf_prog_run include/linux/filter.h:610 [inline]
  __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline]
  bpf_trace_run4+0x253/0x470 kernel/trace/bpf_trace.c:2314
  __bpf_trace_mm_page_alloc+0xba/0xe0 include/trace/events/kmem.h:177
  trace_mm_page_alloc include/trace/events/kmem.h:177 [inline]
  __alloc_pages+0x717/0x770 mm/page_alloc.c:5569
  alloc_slab_page+0x6a/0x150 mm/slub.c:1794
  allocate_slab mm/slub.c:1939 [inline]
  new_slab+0x84/0x2d0 mm/slub.c:1992
  ___slab_alloc+0xc20/0x1270 mm/slub.c:3180
  __slab_alloc mm/slub.c:3279 [inline]
  slab_alloc_node mm/slub.c:3364 [inline]
  slab_alloc mm/slub.c:3406 [inline]
  __kmem_cache_alloc_lru mm/slub.c:3413 [inline]
  kmem_cache_alloc+0x1a5/0x2d0 mm/slub.c:3422
  kmem_cache_zalloc include/linux/slab.h:682 [inline]
  __proc_create+0x419/0x9f0 fs/proc/generic.c:426
  proc_create_reg fs/proc/generic.c:553 [inline]
  proc_create_single_data+0x123/0x240 fs/proc/generic.c:653
  snmp6_register_dev+0xa1/0x110 net/ipv6/proc.c:256
  ipv6_add_dev+0x611/0x1180 net/ipv6/addrconf.c:414
  addrconf_notify+0x7a6/0xf60 net/ipv6/addrconf.c:3577
  notifier_call_chain kernel/notifier.c:87 [inline]
  raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:455
  call_netdevice_notifiers_info net/core/dev.c:1970 [inline]
  call_netdevice_notifiers_extack net/core/dev.c:2008 [inline]
  call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:2022
  register_netdevice+0x12f2/0x1720 net/core/dev.c:10132
  __ip_tunnel_create+0x2b0/0x370 net/ipv4/ip_tunnel.c:267
  ip_tunnel_init_net+0x21f/0x700 net/ipv4/ip_tunnel.c:1100
  ops_init+0x356/0x600 net/core/net_namespace.c:135
  setup_net+0x4b5/0xb90 net/core/net_namespace.c:332
  copy_net_ns+0x395/0x5d0 net/core/net_namespace.c:478
  create_new_namespaces+0x425/0x7a0 kernel/nsproxy.c:110
  unshare_nsproxy_namespaces+0x11e/0x170 kernel/nsproxy.c:226
  ksys_unshare+0x580/0xb20 kernel/fork.c:3203
  __do_sys_unshare kernel/fork.c:3274 [inline]
  __se_sys_unshare kernel/fork.c:3272 [inline]
  __x64_sys_unshare+0x34/0x40 kernel/fork.c:3272
  do_syscall_x64 arch/x86/entry/common.c:51 [inline]
  do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
  entry_SYSCALL_64_after_hwframe+0x63/0xcd

other info that might help us debug this:

 Possible interrupt unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&htab->buckets[i].lock);
                               local_irq_disable();
                               lock(hrtimer_bases.lock);
                               lock(&htab->buckets[i].lock);
  <Interrupt>
    lock(hrtimer_bases.lock);

 *** DEADLOCK ***

2 locks held by syz-executor349/3552:
 #0: ffff8880b992a4d8 (hrtimer_bases.lock){-.-.}-{2:2}, at: lock_hrtimer_base kernel/time/hrtimer.c:173 [inline]
 #0: ffff8880b992a4d8 (hrtimer_bases.lock){-.-.}-{2:2}, at: hrtimer_start_range_ns+0xd8/0xc50 kernel/time/hrtimer.c:1297
 #1: ffffffff8d12a980 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #1: ffffffff8d12a980 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #1: ffffffff8d12a980 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline]
 #1: ffffffff8d12a980 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x16a/0x470 kernel/trace/bpf_trace.c:2314

the dependencies between HARDIRQ-irq-safe lock and the holding lock:
-> (hrtimer_bases.lock){-.-.}-{2:2} {
   IN-HARDIRQ-W at:
                    lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                    __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
                    _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
                    hrtimer_run_queues+0x181/0x450 kernel/time/hrtimer.c:1916
                    run_local_timers kernel/time/timer.c:1845 [inline]
                    update_process_times+0x7b/0x1b0 kernel/time/timer.c:1868
                    tick_periodic+0x197/0x210 kernel/time/tick-common.c:100
                    tick_handle_periodic+0x46/0x150 kernel/time/tick-common.c:112
                    timer_interrupt+0x4d/0x60 arch/x86/kernel/time.c:57
                    __handle_irq_event_percpu+0x2a8/0xb20 kernel/irq/handle.c:158
                    handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
                    handle_irq_event+0x85/0x1e0 kernel/irq/handle.c:210
                    handle_level_irq+0x3ab/0x6c0 kernel/irq/chip.c:650
                    generic_handle_irq_desc include/linux/irqdesc.h:158 [inline]
                    handle_irq arch/x86/kernel/irq.c:231 [inline]
                    __common_interrupt+0xd7/0x1f0 arch/x86/kernel/irq.c:250
                    common_interrupt+0x9f/0xc0 arch/x86/kernel/irq.c:240
                    asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:644
                    __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
                    _raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194
                    __setup_irq+0x12fa/0x1d80 kernel/irq/manage.c:1809
                    request_threaded_irq+0x2a7/0x380 kernel/irq/manage.c:2198
                    request_irq include/linux/interrupt.h:168 [inline]
                    setup_default_timer_irq+0x1f/0x30 arch/x86/kernel/time.c:70
                    x86_late_time_init+0x51/0x86 arch/x86/kernel/time.c:94
                    start_kernel+0x414/0x53f init/main.c:1102
                    secondary_startup_64_no_verify+0xcf/0xdb
   IN-SOFTIRQ-W at:
                    lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                    __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
                    _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
                    hrtimer_interrupt+0xf7/0x980 kernel/time/hrtimer.c:1793
                    local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1095 [inline]
                    __sysvec_apic_timer_interrupt+0x156/0x580 arch/x86/kernel/apic/apic.c:1112
                    sysvec_apic_timer_interrupt+0x3e/0xb0 arch/x86/kernel/apic/apic.c:1106
                    asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
                    arch_local_irq_enable arch/x86/include/asm/irqflags.h:80 [inline]
                    __do_softirq+0x1f3/0xa4c kernel/softirq.c:555
                    invoke_softirq kernel/softirq.c:445 [inline]
                    __irq_exit_rcu+0x155/0x240 kernel/softirq.c:650
                    irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
                    common_interrupt+0xa4/0xc0 arch/x86/kernel/irq.c:240
                    asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:644
                    finish_task_switch+0x1d3/0x810 kernel/sched/core.c:5124
                    context_switch kernel/sched/core.c:5248 [inline]
                    __schedule+0x1435/0x4550 kernel/sched/core.c:6558
                    schedule_idle+0x4a/0x90 kernel/sched/core.c:6662
                    do_idle+0x62d/0x680 kernel/sched/idle.c:331
                    cpu_startup_entry+0x3d/0x60 kernel/sched/idle.c:401
                    start_secondary+0xe4/0xf0 arch/x86/kernel/smpboot.c:281
                    secondary_startup_64_no_verify+0xcf/0xdb
   INITIAL USE at:
                   lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                   __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
                   _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
                   hrtimer_run_queues+0x181/0x450 kernel/time/hrtimer.c:1916
                   run_local_timers kernel/time/timer.c:1845 [inline]
                   update_process_times+0x7b/0x1b0 kernel/time/timer.c:1868
                   tick_periodic+0x197/0x210 kernel/time/tick-common.c:100
                   tick_handle_periodic+0x46/0x150 kernel/time/tick-common.c:112
                   timer_interrupt+0x4d/0x60 arch/x86/kernel/time.c:57
                   __handle_irq_event_percpu+0x2a8/0xb20 kernel/irq/handle.c:158
                   handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
                   handle_irq_event+0x85/0x1e0 kernel/irq/handle.c:210
                   handle_level_irq+0x3ab/0x6c0 kernel/irq/chip.c:650
                   generic_handle_irq_desc include/linux/irqdesc.h:158 [inline]
                   handle_irq arch/x86/kernel/irq.c:231 [inline]
                   __common_interrupt+0xd7/0x1f0 arch/x86/kernel/irq.c:250
                   common_interrupt+0x9f/0xc0 arch/x86/kernel/irq.c:240
                   asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:644
                   __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
                   _raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194
                   __setup_irq+0x12fa/0x1d80 kernel/irq/manage.c:1809
                   request_threaded_irq+0x2a7/0x380 kernel/irq/manage.c:2198
                   request_irq include/linux/interrupt.h:168 [inline]
                   setup_default_timer_irq+0x1f/0x30 arch/x86/kernel/time.c:70
                   x86_late_time_init+0x51/0x86 arch/x86/kernel/time.c:94
                   start_kernel+0x414/0x53f init/main.c:1102
                   secondary_startup_64_no_verify+0xcf/0xdb
 }
 ... key      at: [<ffff8880b982a4d8>] 0xffff8880b982a4d8

the dependencies between the lock to be acquired
 and HARDIRQ-irq-unsafe lock:
-> (&htab->buckets[i].lock){+.-.}-{2:2} {
   HARDIRQ-ON-W at:
                    lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                    __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
                    _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
                    sock_hash_delete_elem+0xac/0x2f0 net/core/sock_map.c:932
                    bpf_prog_a8aaa52f2e199321+0x46/0x46
                    bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline]
                    __bpf_prog_run include/linux/filter.h:603 [inline]
                    bpf_prog_run include/linux/filter.h:610 [inline]
                    __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline]
                    bpf_trace_run4+0x253/0x470 kernel/trace/bpf_trace.c:2314
                    __bpf_trace_mm_page_alloc+0xba/0xe0 include/trace/events/kmem.h:177
                    trace_mm_page_alloc include/trace/events/kmem.h:177 [inline]
                    __alloc_pages+0x717/0x770 mm/page_alloc.c:5569
                    alloc_slab_page+0x6a/0x150 mm/slub.c:1794
                    allocate_slab mm/slub.c:1939 [inline]
                    new_slab+0x84/0x2d0 mm/slub.c:1992
                    ___slab_alloc+0xc20/0x1270 mm/slub.c:3180
                    __slab_alloc mm/slub.c:3279 [inline]
                    slab_alloc_node mm/slub.c:3364 [inline]
                    slab_alloc mm/slub.c:3406 [inline]
                    __kmem_cache_alloc_lru mm/slub.c:3413 [inline]
                    kmem_cache_alloc+0x1a5/0x2d0 mm/slub.c:3422
                    kmem_cache_zalloc include/linux/slab.h:682 [inline]
                    __proc_create+0x419/0x9f0 fs/proc/generic.c:426
                    proc_create_reg fs/proc/generic.c:553 [inline]
                    proc_create_single_data+0x123/0x240 fs/proc/generic.c:653
                    snmp6_register_dev+0xa1/0x110 net/ipv6/proc.c:256
                    ipv6_add_dev+0x611/0x1180 net/ipv6/addrconf.c:414
                    addrconf_notify+0x7a6/0xf60 net/ipv6/addrconf.c:3577
                    notifier_call_chain kernel/notifier.c:87 [inline]
                    raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:455
                    call_netdevice_notifiers_info net/core/dev.c:1970 [inline]
                    call_netdevice_notifiers_extack net/core/dev.c:2008 [inline]
                    call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:2022
                    register_netdevice+0x12f2/0x1720 net/core/dev.c:10132
                    __ip_tunnel_create+0x2b0/0x370 net/ipv4/ip_tunnel.c:267
                    ip_tunnel_init_net+0x21f/0x700 net/ipv4/ip_tunnel.c:1100
                    ops_init+0x356/0x600 net/core/net_namespace.c:135
                    setup_net+0x4b5/0xb90 net/core/net_namespace.c:332
                    copy_net_ns+0x395/0x5d0 net/core/net_namespace.c:478
                    create_new_namespaces+0x425/0x7a0 kernel/nsproxy.c:110
                    unshare_nsproxy_namespaces+0x11e/0x170 kernel/nsproxy.c:226
                    ksys_unshare+0x580/0xb20 kernel/fork.c:3203
                    __do_sys_unshare kernel/fork.c:3274 [inline]
                    __se_sys_unshare kernel/fork.c:3272 [inline]
                    __x64_sys_unshare+0x34/0x40 kernel/fork.c:3272
                    do_syscall_x64 arch/x86/entry/common.c:51 [inline]
                    do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
                    entry_SYSCALL_64_after_hwframe+0x63/0xcd
   IN-SOFTIRQ-W at:
                    lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                    __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
                    _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
                    sock_hash_delete_elem+0xac/0x2f0 net/core/sock_map.c:932
                    0xffffffffa0002066
                    bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline]
                    __bpf_prog_run include/linux/filter.h:603 [inline]
                    bpf_prog_run include/linux/filter.h:610 [inline]
                    __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline]
                    bpf_trace_run4+0x253/0x470 kernel/trace/bpf_trace.c:2314
                    __bpf_trace_mm_page_alloc+0xba/0xe0 include/trace/events/kmem.h:177
                    __traceiter_mm_page_alloc+0x35/0x50 include/trace/events/kmem.h:177
                    trace_mm_page_alloc include/trace/events/kmem.h:177 [inline]
                    __alloc_pages+0x717/0x770 mm/page_alloc.c:5569
                    __alloc_pages_node include/linux/gfp.h:237 [inline]
                    alloc_pages_node+0x127/0x1b0 include/linux/gfp.h:260
                    page_frag_alloc_1k net/core/skbuff.c:163 [inline]
                    __napi_alloc_skb+0x34b/0x520 net/core/skbuff.c:681
                    napi_alloc_skb include/linux/skbuff.h:3231 [inline]
                    page_to_skb+0x282/0xb60 drivers/net/virtio_net.c:501
                    receive_mergeable drivers/net/virtio_net.c:1128 [inline]
                    receive_buf+0x436/0x5520 drivers/net/virtio_net.c:1267
                    virtnet_receive drivers/net/virtio_net.c:1562 [inline]
                    virtnet_poll+0x6d3/0x1470 drivers/net/virtio_net.c:1680
                    __napi_poll+0xc7/0x470 net/core/dev.c:6537
                    napi_poll net/core/dev.c:6604 [inline]
                    net_rx_action+0x70f/0xeb0 net/core/dev.c:6718
                    __do_softirq+0x2e9/0xa4c kernel/softirq.c:571
                    invoke_softirq kernel/softirq.c:445 [inline]
                    __irq_exit_rcu+0x155/0x240 kernel/softirq.c:650
                    irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
                    common_interrupt+0xa4/0xc0 arch/x86/kernel/irq.c:240
                    asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:644
                    bytes_is_nonzero mm/kasan/generic.c:84 [inline]
                    memory_is_nonzero mm/kasan/generic.c:102 [inline]
                    memory_is_poisoned_n mm/kasan/generic.c:128 [inline]
                    memory_is_poisoned mm/kasan/generic.c:159 [inline]
                    check_region_inline mm/kasan/generic.c:180 [inline]
                    kasan_check_range+0x71/0x290 mm/kasan/generic.c:189
                    instrument_atomic_read include/linux/instrumented.h:72 [inline]
                    _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
                    cpumask_test_cpu include/linux/cpumask.h:444 [inline]
                    cpu_online include/linux/cpumask.h:1030 [inline]
                    trace_lock_release include/trace/events/lock.h:69 [inline]
                    lock_release+0xc7/0xa20 kernel/locking/lockdep.c:5673
                    rcu_lock_release include/linux/rcupdate.h:355 [inline]
                    rcu_read_unlock include/linux/rcupdate.h:824 [inline]
                    __d_lookup+0x6d6/0x790 fs/dcache.c:2505
                    lookup_fast+0x74/0x490 fs/namei.c:1648
                    open_last_lookups fs/namei.c:3521 [inline]
                    path_openat+0x640/0x2e60 fs/namei.c:3782
                    do_filp_open+0x230/0x480 fs/namei.c:3812
                    do_sys_openat2+0x13b/0x500 fs/open.c:1318
                    do_sys_open fs/open.c:1334 [inline]
                    __do_sys_openat fs/open.c:1350 [inline]
                    __se_sys_openat fs/open.c:1345 [inline]
                    __x64_sys_openat+0x243/0x290 fs/open.c:1345
                    do_syscall_x64 arch/x86/entry/common.c:51 [inline]
                    do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
                    entry_SYSCALL_64_after_hwframe+0x63/0xcd
   INITIAL USE at:
                   lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
                   __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
                   _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
                   sock_hash_delete_elem+0xac/0x2f0 net/core/sock_map.c:932
                   bpf_prog_a8aaa52f2e199321+0x46/0x46
                   bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline]
                   __bpf_prog_run include/linux/filter.h:603 [inline]
                   bpf_prog_run include/linux/filter.h:610 [inline]
                   __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline]
                   bpf_trace_run4+0x253/0x470 kernel/trace/bpf_trace.c:2314
                   __bpf_trace_mm_page_alloc+0xba/0xe0 include/trace/events/kmem.h:177
                   trace_mm_page_alloc include/trace/events/kmem.h:177 [inline]
                   __alloc_pages+0x717/0x770 mm/page_alloc.c:5569
                   alloc_slab_page+0x6a/0x150 mm/slub.c:1794
                   allocate_slab mm/slub.c:1939 [inline]
                   new_slab+0x84/0x2d0 mm/slub.c:1992
                   ___slab_alloc+0xc20/0x1270 mm/slub.c:3180
                   __slab_alloc mm/slub.c:3279 [inline]
                   slab_alloc_node mm/slub.c:3364 [inline]
                   slab_alloc mm/slub.c:3406 [inline]
                   __kmem_cache_alloc_lru mm/slub.c:3413 [inline]
                   kmem_cache_alloc+0x1a5/0x2d0 mm/slub.c:3422
                   kmem_cache_zalloc include/linux/slab.h:682 [inline]
                   __proc_create+0x419/0x9f0 fs/proc/generic.c:426
                   proc_create_reg fs/proc/generic.c:553 [inline]
                   proc_create_single_data+0x123/0x240 fs/proc/generic.c:653
                   snmp6_register_dev+0xa1/0x110 net/ipv6/proc.c:256
                   ipv6_add_dev+0x611/0x1180 net/ipv6/addrconf.c:414
                   addrconf_notify+0x7a6/0xf60 net/ipv6/addrconf.c:3577
                   notifier_call_chain kernel/notifier.c:87 [inline]
                   raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:455
                   call_netdevice_notifiers_info net/core/dev.c:1970 [inline]
                   call_netdevice_notifiers_extack net/core/dev.c:2008 [inline]
                   call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:2022
                   register_netdevice+0x12f2/0x1720 net/core/dev.c:10132
                   __ip_tunnel_create+0x2b0/0x370 net/ipv4/ip_tunnel.c:267
                   ip_tunnel_init_net+0x21f/0x700 net/ipv4/ip_tunnel.c:1100
                   ops_init+0x356/0x600 net/core/net_namespace.c:135
                   setup_net+0x4b5/0xb90 net/core/net_namespace.c:332
                   copy_net_ns+0x395/0x5d0 net/core/net_namespace.c:478
                   create_new_namespaces+0x425/0x7a0 kernel/nsproxy.c:110
                   unshare_nsproxy_namespaces+0x11e/0x170 kernel/nsproxy.c:226
                   ksys_unshare+0x580/0xb20 kernel/fork.c:3203
                   __do_sys_unshare kernel/fork.c:3274 [inline]
                   __se_sys_unshare kernel/fork.c:3272 [inline]
                   __x64_sys_unshare+0x34/0x40 kernel/fork.c:3272
                   do_syscall_x64 arch/x86/entry/common.c:51 [inline]
                   do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
                   entry_SYSCALL_64_after_hwframe+0x63/0xcd
 }
 ... key      at: [<ffffffff920b1340>] sock_hash_alloc.__key+0x0/0x20
 ... acquired at:
   lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
   __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
   _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
   sock_hash_delete_elem+0xac/0x2f0 net/core/sock_map.c:932
   bpf_prog_a8aaa52f2e199321+0x42/0x46
   bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline]
   __bpf_prog_run include/linux/filter.h:603 [inline]
   bpf_prog_run include/linux/filter.h:610 [inline]
   __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline]
   bpf_trace_run4+0x253/0x470 kernel/trace/bpf_trace.c:2314
   __bpf_trace_mm_page_alloc+0xba/0xe0 include/trace/events/kmem.h:177
   __traceiter_mm_page_alloc+0x35/0x50 include/trace/events/kmem.h:177
   trace_mm_page_alloc include/trace/events/kmem.h:177 [inline]
   __alloc_pages+0x717/0x770 mm/page_alloc.c:5569
   __stack_depot_save+0x372/0x470 lib/stackdepot.c:474
   save_stack+0x104/0x1e0 mm/page_owner.c:128
   __set_page_owner+0x26/0x390 mm/page_owner.c:190
   set_page_owner include/linux/page_owner.h:31 [inline]
   post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2513
   prep_new_page mm/page_alloc.c:2520 [inline]
   get_page_from_freelist+0x31a1/0x3320 mm/page_alloc.c:4279
   __alloc_pages+0x28d/0x770 mm/page_alloc.c:5547
   __stack_depot_save+0x372/0x470 lib/stackdepot.c:474
   kasan_save_stack mm/kasan/common.c:46 [inline]
   kasan_set_track+0x60/0x70 mm/kasan/common.c:52
   __kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:328
   kasan_slab_alloc include/linux/kasan.h:201 [inline]
   slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737
   slab_alloc_node mm/slub.c:3398 [inline]
   slab_alloc mm/slub.c:3406 [inline]
   __kmem_cache_alloc_lru mm/slub.c:3413 [inline]
   kmem_cache_alloc+0x10c/0x2d0 mm/slub.c:3422
   kmem_cache_zalloc include/linux/slab.h:682 [inline]
   fill_pool lib/debugobjects.c:168 [inline]
   debug_objects_fill_pool+0x485/0xa10 lib/debugobjects.c:606
   debug_object_activate+0x32/0x4e0 lib/debugobjects.c:693
   debug_hrtimer_activate kernel/time/hrtimer.c:420 [inline]
   debug_activate kernel/time/hrtimer.c:475 [inline]
   enqueue_hrtimer+0x30/0x410 kernel/time/hrtimer.c:1084
   __hrtimer_start_range_ns kernel/time/hrtimer.c:1259 [inline]
   hrtimer_start_range_ns+0xa9c/0xc50 kernel/time/hrtimer.c:1299
   hrtimer_start_expires include/linux/hrtimer.h:434 [inline]
   hrtimer_sleeper_start_expires kernel/time/hrtimer.c:1966 [inline]
   do_nanosleep+0x153/0x5f0 kernel/time/hrtimer.c:2042
   hrtimer_nanosleep+0x24d/0x490 kernel/time/hrtimer.c:2098
   __do_sys_clock_nanosleep kernel/time/posix-timers.c:1308 [inline]
   __se_sys_clock_nanosleep+0x323/0x3b0 kernel/time/posix-timers.c:1285
   do_syscall_x64 arch/x86/entry/common.c:51 [inline]
   do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
   entry_SYSCALL_64_after_hwframe+0x63/0xcd


stack backtrace:
CPU: 1 PID: 3552 Comm: syz-executor349 Not tainted 6.1.84-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_bad_irq_dependency kernel/locking/lockdep.c:2604 [inline]
 check_irq_usage kernel/locking/lockdep.c:2843 [inline]
 check_prev_add kernel/locking/lockdep.c:3094 [inline]
 check_prevs_add kernel/locking/lockdep.c:3209 [inline]
 validate_chain+0x4d16/0x5950 kernel/locking/lockdep.c:3825
 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
 _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
 sock_hash_delete_elem+0xac/0x2f0 net/core/sock_map.c:932
 bpf_prog_a8aaa52f2e199321+0x42/0x46
 bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline]
 __bpf_prog_run include/linux/filter.h:603 [inline]
 bpf_prog_run include/linux/filter.h:610 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline]
 bpf_trace_run4+0x253/0x470 kernel/trace/bpf_trace.c:2314
 __bpf_trace_mm_page_alloc+0xba/0xe0 include/trace/events/kmem.h:177
 __traceiter_mm_page_alloc+0x35/0x50 include/trace/events/kmem.h:177
 trace_mm_page_alloc include/trace/events/kmem.h:177 [inline]
 __alloc_pages+0x717/0x770 mm/page_alloc.c:5569
 __stack_depot_save+0x372/0x470 lib/stackdepot.c:474
 save_stack+0x104/0x1e0 mm/page_owner.c:128
 __set_page_owner+0x26/0x390 mm/page_owner.c:190
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2513
 prep_new_page mm/page_alloc.c:2520 [inline]
 get_page_from_freelist+0x31a1/0x3320 mm/page_alloc.c:4279
 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5547
 __stack_depot_save+0x372/0x470 lib/stackdepot.c:474
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x60/0x70 mm/kasan/common.c:52
 __kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:328
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737
 slab_alloc_node mm/slub.c:3398 [inline]
 slab_alloc mm/slub.c:3406 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3413 [inline]
 kmem_cache_alloc+0x10c/0x2d0 mm/slub.c:3422
 kmem_cache_zalloc include/linux/slab.h:682 [inline]
 fill_pool lib/debugobjects.c:168 [inline]
 debug_objects_fill_pool+0x485/0xa10 lib/debugobjects.c:606
 debug_object_activate+0x32/0x4e0 lib/debugobjects.c:693
 debug_hrtimer_activate kernel/time/hrtimer.c:420 [inline]
 debug_activate kernel/time/hrtimer.c:475 [inline]
 enqueue_hrtimer+0x30/0x410 kernel/time/hrtimer.c:1084
 __hrtimer_start_range_ns kernel/time/hrtimer.c:1259 [inline]
 hrtimer_start_range_ns+0xa9c/0xc50 kernel/time/hrtimer.c:1299
 hrtimer_start_expires include/linux/hrtimer.h:434 [inline]
 hrtimer_sleeper_start_expires kernel/time/hrtimer.c:1966 [inline]
 do_nanosleep+0x153/0x5f0 kernel/time/hrtimer.c:2042
 hrtimer_nanosleep+0x24d/0x490 kernel/time/hrtimer.c:2098
 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1308 [inline]
 __se_sys_clock_nanosleep+0x323/0x3b0 kernel/time/posix-timers.c:1285
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fa7e63276c3
Code: 00 00 00 00 00 66 90 83 ff 03 74 7b 83 ff 02 b8 fa ff ff ff 49 89 ca 0f 44 f8 80 3d be 09 05 00 00 74 14 b8 e6 00 00 00 0f 05 <f7> d8 c3 66 2e 0f 1f 84 00 00 00 00 00 48 83 ec 28 48 89 54 24 10
RSP: 002b:00007fff7526bfb8 EFLAGS: 00000202 ORIG_RAX: 00000000000000e6
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007fa7e63276c3
RDX: 00007fff7526bfd0 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00000000000f4240 R08: 00007fff753840b0 R09: 0000000000000010
R10: 0000000000000000 R11: 0000000000000202 R12: 000000000001087e
R13: 00007fff7526c004 R14: 00007fff7526c020 R15: 00007fff7526c010
 </TASK>

Crashes (19):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/07 03:37 linux-6.1.y 347385861c50 ca620dd8 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in hrtimer_run_queues
2024/03/31 22:05 linux-6.1.y e5cd595e23c1 6baf5069 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in hrtimer_run_queues
2024/03/29 02:58 linux-6.1.y e5cd595e23c1 e91187ee .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in hrtimer_run_queues
2024/03/17 02:34 linux-6.1.y d7543167affd d615901c .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in hrtimer_run_queues
2024/03/15 23:11 linux-6.1.y d7543167affd d615901c .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in hrtimer_run_queues
2024/04/10 09:03 linux-6.1.y 347385861c50 171ec371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in hrtimer_run_queues
2024/04/10 00:15 linux-6.1.y 347385861c50 171ec371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hrtimer_run_queues
2024/04/09 22:46 linux-6.1.y 347385861c50 171ec371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hrtimer_run_queues
2024/04/09 22:30 linux-6.1.y 347385861c50 171ec371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hrtimer_run_queues
2024/04/09 18:12 linux-6.1.y 347385861c50 f3234354 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hrtimer_run_queues
2024/04/06 10:54 linux-6.1.y 347385861c50 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hrtimer_run_queues
2024/04/06 05:58 linux-6.1.y 347385861c50 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hrtimer_run_queues
2024/04/05 20:21 linux-6.1.y 347385861c50 77230c29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in hrtimer_run_queues
2024/04/05 18:53 linux-6.1.y 347385861c50 77230c29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in hrtimer_run_queues
2024/04/02 01:41 linux-6.1.y e5cd595e23c1 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in hrtimer_run_queues
2024/03/30 09:49 linux-6.1.y e5cd595e23c1 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in hrtimer_run_queues
2024/03/30 07:16 linux-6.1.y e5cd595e23c1 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in hrtimer_run_queues
2024/03/28 15:17 linux-6.1.y e5cd595e23c1 e91187ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in hrtimer_run_queues
2024/03/20 00:00 linux-6.1.y d7543167affd e104824c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in hrtimer_run_queues
* Struck through repros no longer work on HEAD.