[v5.15] possible deadlock in __lock_task_sighand

0 views
Skip to first unread message

syzbot

unread,
Mar 14, 2024, 3:24:17 PMMar 14
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 574362648507 Linux 5.15.151
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13ddd3b6180000
kernel config: https://syzkaller.appspot.com/x/.config?x=6c9a42d9e3519ca9
dashboard link: https://syzkaller.appspot.com/bug?extid=ea3c231a8c41516b2306
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f00d4062000b/disk-57436264.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3a74c2b6ca62/vmlinux-57436264.xz
kernel image: https://storage.googleapis.com/syzbot-assets/93bd706dc219/bzImage-57436264.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ea3c23...@syzkaller.appspotmail.com

=====================================================
WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected
5.15.151-syzkaller #0 Not tainted
-----------------------------------------------------
syz-fuzzer/3507 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire:
ffff888079e311c0 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:416 [inline]
ffff888079e311c0 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448

and this task is already holding:
ffff888022e51298 (&sighand->siglock){-...}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:388 [inline]
ffff888022e51298 (&sighand->siglock){-...}-{2:2}, at: get_signal+0x20e/0x14e0 kernel/signal.c:2686
which would create a new lock dependency:
(&sighand->siglock){-...}-{2:2} -> (&stab->lock){+.-.}-{2:2}

but this new dependency connects a HARDIRQ-irq-safe lock:
(&sighand->siglock){-...}-{2:2}

... which became HARDIRQ-irq-safe at:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
__lock_task_sighand+0x11a/0x290 kernel/signal.c:1404
lock_task_sighand include/linux/sched/signal.h:704 [inline]
send_sigqueue+0x1bc/0x6e0 kernel/signal.c:1971
posix_timer_event kernel/time/posix-timers.c:359 [inline]
posix_timer_fn+0x186/0x390 kernel/time/posix-timers.c:385
__run_hrtimer kernel/time/hrtimer.c:1686 [inline]
__hrtimer_run_queues+0x598/0xcf0 kernel/time/hrtimer.c:1750
hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1812
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1085 [inline]
__sysvec_apic_timer_interrupt+0x139/0x470 arch/x86/kernel/apic/apic.c:1102
sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1096
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
kasan_check_range+0x1/0x290 mm/kasan/generic.c:188
instrument_atomic_read include/linux/instrumented.h:71 [inline]
test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline]
cpumask_test_cpu include/linux/cpumask.h:344 [inline]
cpu_online include/linux/cpumask.h:895 [inline]
trace_lock_acquire include/trace/events/lock.h:13 [inline]
lock_acquire+0xcc/0x4f0 kernel/locking/lockdep.c:5594
rcu_lock_acquire+0x2a/0x30 include/linux/rcupdate.h:269
rcu_read_lock include/linux/rcupdate.h:696 [inline]
batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:412 [inline]
batadv_nc_worker+0xc1/0x5b0 net/batman-adv/network-coding.c:723
process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
kthread+0x3f6/0x4f0 kernel/kthread.c:319
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298

to a HARDIRQ-irq-unsafe lock:
(&stab->lock){+.-.}-{2:2}

... which became HARDIRQ-irq-unsafe at:
...
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
_raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
__sock_map_delete net/core/sock_map.c:416 [inline]
sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448
0xffffffffa002c85e
bpf_dispatcher_nop_func include/linux/bpf.h:780 [inline]
__bpf_prog_run include/linux/filter.h:625 [inline]
bpf_prog_run include/linux/filter.h:632 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline]
bpf_trace_run3+0x1d1/0x380 kernel/trace/bpf_trace.c:1918
__bpf_trace_kmem_cache_free+0x99/0xc0 include/trace/events/kmem.h:138
trace_kmem_cache_free include/trace/events/kmem.h:138 [inline]
kmem_cache_free+0x1ce/0x1f0 mm/slub.c:3516
sk_prot_free net/core/sock.c:1886 [inline]
__sk_destruct+0x57f/0x840 net/core/sock.c:1974
inet_release+0x174/0x1f0 net/ipv4/af_inet.c:434
__sock_release net/socket.c:649 [inline]
sock_close+0xcd/0x230 net/socket.c:1336
__fput+0x3bf/0x890 fs/file_table.c:280
task_work_run+0x129/0x1a0 kernel/task_work.c:164
tracehook_notify_resume include/linux/tracehook.h:189 [inline]
exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:175
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208
__syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
syscall_exit_to_user_mode+0x5d/0x250 kernel/entry/common.c:301
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x61/0xcb

other info that might help us debug this:

Possible interrupt unsafe locking scenario:

CPU0 CPU1
---- ----
lock(&stab->lock);
local_irq_disable();
lock(&sighand->siglock);
lock(&stab->lock);
<Interrupt>
lock(&sighand->siglock);

*** DEADLOCK ***

2 locks held by syz-fuzzer/3507:
#0: ffff888022e51298 (&sighand->siglock){-...}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:388 [inline]
#0: ffff888022e51298 (&sighand->siglock){-...}-{2:2}, at: get_signal+0x20e/0x14e0 kernel/signal.c:2686
#1: ffffffff8c91f720 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:268

the dependencies between HARDIRQ-irq-safe lock and the holding lock:
-> (&sighand->siglock){-...}-{2:2} {
IN-HARDIRQ-W at:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
__lock_task_sighand+0x11a/0x290 kernel/signal.c:1404
lock_task_sighand include/linux/sched/signal.h:704 [inline]
send_sigqueue+0x1bc/0x6e0 kernel/signal.c:1971
posix_timer_event kernel/time/posix-timers.c:359 [inline]
posix_timer_fn+0x186/0x390 kernel/time/posix-timers.c:385
__run_hrtimer kernel/time/hrtimer.c:1686 [inline]
__hrtimer_run_queues+0x598/0xcf0 kernel/time/hrtimer.c:1750
hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1812
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1085 [inline]
__sysvec_apic_timer_interrupt+0x139/0x470 arch/x86/kernel/apic/apic.c:1102
sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1096
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
kasan_check_range+0x1/0x290 mm/kasan/generic.c:188
instrument_atomic_read include/linux/instrumented.h:71 [inline]
test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline]
cpumask_test_cpu include/linux/cpumask.h:344 [inline]
cpu_online include/linux/cpumask.h:895 [inline]
trace_lock_acquire include/trace/events/lock.h:13 [inline]
lock_acquire+0xcc/0x4f0 kernel/locking/lockdep.c:5594
rcu_lock_acquire+0x2a/0x30 include/linux/rcupdate.h:269
rcu_read_lock include/linux/rcupdate.h:696 [inline]
batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:412 [inline]
batadv_nc_worker+0xc1/0x5b0 net/batman-adv/network-coding.c:723
process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
kthread+0x3f6/0x4f0 kernel/kthread.c:319
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
INITIAL USE at:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__raw_spin_lock_irq include/linux/spinlock_api_smp.h:128 [inline]
_raw_spin_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:170
spin_lock_irq include/linux/spinlock.h:388 [inline]
calculate_sigpending+0x4a/0x80 kernel/signal.c:195
ret_from_fork+0x8/0x30 arch/x86/entry/entry_64.S:283
}
... key at: [<ffffffff8f5d7620>] sighand_ctor.__key+0x0/0x20

the dependencies between the lock to be acquired
and HARDIRQ-irq-unsafe lock:
-> (&stab->lock){+.-.}-{2:2} {
HARDIRQ-ON-W at:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
_raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
__sock_map_delete net/core/sock_map.c:416 [inline]
sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448
0xffffffffa002c85e
bpf_dispatcher_nop_func include/linux/bpf.h:780 [inline]
__bpf_prog_run include/linux/filter.h:625 [inline]
bpf_prog_run include/linux/filter.h:632 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline]
bpf_trace_run3+0x1d1/0x380 kernel/trace/bpf_trace.c:1918
__bpf_trace_kmem_cache_free+0x99/0xc0 include/trace/events/kmem.h:138
trace_kmem_cache_free include/trace/events/kmem.h:138 [inline]
kmem_cache_free+0x1ce/0x1f0 mm/slub.c:3516
sk_prot_free net/core/sock.c:1886 [inline]
__sk_destruct+0x57f/0x840 net/core/sock.c:1974
inet_release+0x174/0x1f0 net/ipv4/af_inet.c:434
__sock_release net/socket.c:649 [inline]
sock_close+0xcd/0x230 net/socket.c:1336
__fput+0x3bf/0x890 fs/file_table.c:280
task_work_run+0x129/0x1a0 kernel/task_work.c:164
tracehook_notify_resume include/linux/tracehook.h:189 [inline]
exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:175
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208
__syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
syscall_exit_to_user_mode+0x5d/0x250 kernel/entry/common.c:301
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x61/0xcb
IN-SOFTIRQ-W at:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
_raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
__sock_map_delete net/core/sock_map.c:416 [inline]
sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448
bpf_prog_2c29ac5cdc6b1842+0x3a/0xdbc
bpf_dispatcher_nop_func include/linux/bpf.h:780 [inline]
__bpf_prog_run include/linux/filter.h:625 [inline]
bpf_prog_run include/linux/filter.h:632 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline]
bpf_trace_run3+0x1d1/0x380 kernel/trace/bpf_trace.c:1918
__bpf_trace_kmem_cache_free+0x99/0xc0 include/trace/events/kmem.h:138
trace_kmem_cache_free include/trace/events/kmem.h:138 [inline]
kmem_cache_free+0x1ce/0x1f0 mm/slub.c:3516
rcu_do_batch kernel/rcu/tree.c:2523 [inline]
rcu_core+0xa15/0x1650 kernel/rcu/tree.c:2763
__do_softirq+0x3b3/0x93a kernel/softirq.c:558
invoke_softirq kernel/softirq.c:432 [inline]
__irq_exit_rcu+0x155/0x240 kernel/softirq.c:637
irq_exit_rcu+0x5/0x20 kernel/softirq.c:649
sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1096
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
lock_acquire+0x252/0x4f0 kernel/locking/lockdep.c:5627
rcu_lock_acquire+0x20/0x30 include/linux/rcupdate.h:269
rcu_read_lock include/linux/rcupdate.h:696 [inline]
lock_page_memcg+0xaf/0x4d0 mm/memcontrol.c:2044
page_remove_rmap+0x2a/0x11e0 mm/rmap.c:1351
zap_pte_range mm/memory.c:1373 [inline]
zap_pmd_range mm/memory.c:1494 [inline]
zap_pud_range mm/memory.c:1523 [inline]
zap_p4d_range mm/memory.c:1544 [inline]
unmap_page_range+0xffa/0x2630 mm/memory.c:1565
unmap_vmas+0x1f8/0x390 mm/memory.c:1642
exit_mmap+0x3b6/0x670 mm/mmap.c:3186
__mmput+0x112/0x3b0 kernel/fork.c:1126
exit_mm+0x688/0x7f0 kernel/exit.c:548
do_exit+0x626/0x2480 kernel/exit.c:859
do_group_exit+0x144/0x310 kernel/exit.c:994
get_signal+0xc66/0x14e0 kernel/signal.c:2889
arch_do_signal_or_restart+0xc3/0x1890 arch/x86/kernel/signal.c:867
handle_signal_work kernel/entry/common.c:148 [inline]
exit_to_user_mode_loop+0x97/0x130 kernel/entry/common.c:172
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208
__syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
syscall_exit_to_user_mode+0x5d/0x250 kernel/entry/common.c:301
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x61/0xcb
INITIAL USE at:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
_raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
__sock_map_delete net/core/sock_map.c:416 [inline]
sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448
0xffffffffa002c85e
bpf_dispatcher_nop_func include/linux/bpf.h:780 [inline]
__bpf_prog_run include/linux/filter.h:625 [inline]
bpf_prog_run include/linux/filter.h:632 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline]
bpf_trace_run3+0x1d1/0x380 kernel/trace/bpf_trace.c:1918
__bpf_trace_kmem_cache_free+0x99/0xc0 include/trace/events/kmem.h:138
trace_kmem_cache_free include/trace/events/kmem.h:138 [inline]
kmem_cache_free+0x1ce/0x1f0 mm/slub.c:3516
sk_prot_free net/core/sock.c:1886 [inline]
__sk_destruct+0x57f/0x840 net/core/sock.c:1974
inet_release+0x174/0x1f0 net/ipv4/af_inet.c:434
__sock_release net/socket.c:649 [inline]
sock_close+0xcd/0x230 net/socket.c:1336
__fput+0x3bf/0x890 fs/file_table.c:280
task_work_run+0x129/0x1a0 kernel/task_work.c:164
tracehook_notify_resume include/linux/tracehook.h:189 [inline]
exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:175
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208
__syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
syscall_exit_to_user_mode+0x5d/0x250 kernel/entry/common.c:301
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x61/0xcb
}
... key at: [<ffffffff917896e0>] sock_map_alloc.__key+0x0/0x20
... acquired at:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
_raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
__sock_map_delete net/core/sock_map.c:416 [inline]
sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448
bpf_prog_2c29ac5cdc6b1842+0x3a/0xdbc
bpf_dispatcher_nop_func include/linux/bpf.h:780 [inline]
__bpf_prog_run include/linux/filter.h:625 [inline]
bpf_prog_run include/linux/filter.h:632 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline]
bpf_trace_run3+0x1d1/0x380 kernel/trace/bpf_trace.c:1918
__bpf_trace_kmem_cache_free+0x99/0xc0 include/trace/events/kmem.h:138
trace_kmem_cache_free include/trace/events/kmem.h:138 [inline]
kmem_cache_free+0x1ce/0x1f0 mm/slub.c:3516
__sigqueue_free kernel/signal.c:458 [inline]
collect_signal kernel/signal.c:597 [inline]
__dequeue_signal+0x4ac/0x5c0 kernel/signal.c:619
dequeue_signal+0xab/0x520 kernel/signal.c:637
get_signal+0x52e/0x14e0 kernel/signal.c:2770
arch_do_signal_or_restart+0xc3/0x1890 arch/x86/kernel/signal.c:867
handle_signal_work kernel/entry/common.c:148 [inline]
exit_to_user_mode_loop+0x97/0x130 kernel/entry/common.c:172
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208
irqentry_exit_to_user_mode+0x5/0x40 kernel/entry/common.c:314
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638


stack backtrace:
CPU: 1 PID: 3507 Comm: syz-fuzzer Not tainted 5.15.151-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/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:2567 [inline]
check_irq_usage kernel/locking/lockdep.c:2806 [inline]
check_prev_add kernel/locking/lockdep.c:3057 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain+0x4d01/0x5930 kernel/locking/lockdep.c:3788
__lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
_raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
__sock_map_delete net/core/sock_map.c:416 [inline]
sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448
bpf_prog_2c29ac5cdc6b1842+0x3a/0xdbc
bpf_dispatcher_nop_func include/linux/bpf.h:780 [inline]
__bpf_prog_run include/linux/filter.h:625 [inline]
bpf_prog_run include/linux/filter.h:632 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline]
bpf_trace_run3+0x1d1/0x380 kernel/trace/bpf_trace.c:1918
__bpf_trace_kmem_cache_free+0x99/0xc0 include/trace/events/kmem.h:138
trace_kmem_cache_free include/trace/events/kmem.h:138 [inline]
kmem_cache_free+0x1ce/0x1f0 mm/slub.c:3516
__sigqueue_free kernel/signal.c:458 [inline]
collect_signal kernel/signal.c:597 [inline]
__dequeue_signal+0x4ac/0x5c0 kernel/signal.c:619
dequeue_signal+0xab/0x520 kernel/signal.c:637
get_signal+0x52e/0x14e0 kernel/signal.c:2770
arch_do_signal_or_restart+0xc3/0x1890 arch/x86/kernel/signal.c:867
handle_signal_work kernel/entry/common.c:148 [inline]
exit_to_user_mode_loop+0x97/0x130 kernel/entry/common.c:172
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208
irqentry_exit_to_user_mode+0x5/0x40 kernel/entry/common.c:314
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0033:0x747917
Code: 00 eb 5b 31 f6 45 31 c9 45 31 c0 eb 51 31 ff eb 62 c1 e0 10 09 d0 c3 44 0f b6 13 41 01 d2 45 8d 1c 02 44 0f b6 63 01 45 01 e2 <45> 01 d3 44 0f b6 63 02 45 01 e2 45 01 d3 44 0f b6 63 03 43 8d 14
RSP: 002b:000000c000ea8ce0 EFLAGS: 00000206
RAX: 00000000000c7698 RBX: 000000c02276823c RCX: 0000000000001374
RDX: 0000000000000524 RSI: 0000000000000a50 RDI: 0000000000001dc4
RBP: 000000c000ea8d08 R08: 000000c0227695b0 R09: 0000000000000a50
R10: 0000000000000524 R11: 00000000000c7bbc R12: 0000000000000000
R13: 0000000000007f37 R14: 000000c0000061a0 R15: 0000000000000001
</TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Mar 14, 2024, 6:46:25 PMMar 14
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 61adba85cc40 Linux 6.1.81
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1552692e180000
kernel config: https://syzkaller.appspot.com/x/.config?x=41dc7343796eb054
dashboard link: https://syzkaller.appspot.com/bug?extid=eb8464b6c6e62a3f0c2f
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/bce1b8db2435/disk-61adba85.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/488c5d1c7e73/vmlinux-61adba85.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b0821e919f99/bzImage-61adba85.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+eb8464...@syzkaller.appspotmail.com

=====================================================
WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected
6.1.81-syzkaller #0 Not tainted
-----------------------------------------------------
syz-executor.1/21896 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire:
ffff88802a4e6240 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:416 [inline]
ffff88802a4e6240 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448

and this task is already holding:
ffff888027ee1bd8 (&sighand->siglock){-.-.}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:376 [inline]
ffff888027ee1bd8 (&sighand->siglock){-.-.}-{2:2}, at: get_signal+0x242/0x17d0 kernel/signal.c:2655
which would create a new lock dependency:
(&sighand->siglock){-.-.}-{2:2} -> (&stab->lock){+.-.}-{2:2}

but this new dependency connects a HARDIRQ-irq-safe lock:
(&sighand->siglock){-.-.}-{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
__lock_task_sighand+0x145/0x2d0 kernel/signal.c:1410
lock_task_sighand include/linux/sched/signal.h:745 [inline]
send_sigqueue+0x1de/0x720 kernel/signal.c:1978
posix_timer_event kernel/time/posix-timers.c:354 [inline]
posix_timer_fn+0x186/0x390 kernel/time/posix-timers.c:380
__run_hrtimer kernel/time/hrtimer.c:1686 [inline]
__hrtimer_run_queues+0x5e5/0xe50 kernel/time/hrtimer.c:1750
hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1812
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+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1106
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
lock_acquire+0x26f/0x5a0 kernel/locking/lockdep.c:5666
rcu_lock_acquire include/linux/rcupdate.h:319 [inline]
rcu_read_lock include/linux/rcupdate.h:760 [inline]
is_bpf_text_address+0x3e/0x2a0 kernel/bpf/core.c:731
kernel_text_address+0x9f/0xd0 kernel/extable.c:125
__kernel_text_address+0x9/0x40 kernel/extable.c:79
unwind_get_return_address+0x49/0x80 arch/x86/kernel/unwind_orc.c:323
arch_stack_walk+0xf3/0x140 arch/x86/kernel/stacktrace.c:26
stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/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
anon_vma_chain_alloc mm/rmap.c:141 [inline]
anon_vma_clone+0x94/0x4d0 mm/rmap.c:287
anon_vma_fork+0x83/0x580 mm/rmap.c:350
dup_mmap kernel/fork.c:662 [inline]
dup_mm kernel/fork.c:1540 [inline]
copy_mm+0xc83/0x1990 kernel/fork.c:1589
copy_process+0x19d5/0x4060 kernel/fork.c:2267
kernel_clone+0x222/0x920 kernel/fork.c:2682
__do_sys_clone kernel/fork.c:2823 [inline]
__se_sys_clone kernel/fork.c:2807 [inline]
__x64_sys_clone+0x231/0x280 kernel/fork.c:2807
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

to a HARDIRQ-irq-unsafe lock:
(&stab->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_map_update_common+0x1b6/0x5b0 net/core/sock_map.c:492
sock_map_update_elem_sys+0x55b/0x910 net/core/sock_map.c:581
map_update_elem+0x503/0x680 kernel/bpf/syscall.c:1448
__sys_bpf+0x337/0x6c0 kernel/bpf/syscall.c:4993
__do_sys_bpf kernel/bpf/syscall.c:5109 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5107 [inline]
__x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5107
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(&stab->lock);
local_irq_disable();
lock(&sighand->siglock);
lock(&stab->lock);
<Interrupt>
lock(&sighand->siglock);

*** DEADLOCK ***

2 locks held by syz-executor.1/21896:
#0: ffff888027ee1bd8 (&sighand->siglock){-.-.}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:376 [inline]
#0: ffff888027ee1bd8 (&sighand->siglock){-.-.}-{2:2}, at: get_signal+0x242/0x17d0 kernel/signal.c:2655
#1: ffffffff8d12a840 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:319 [inline]
#1: ffffffff8d12a840 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:760 [inline]
#1: ffffffff8d12a840 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline]
#1: ffffffff8d12a840 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x146/0x440 kernel/trace/bpf_trace.c:2313

the dependencies between HARDIRQ-irq-safe lock and the holding lock:
-> (&sighand->siglock){-.-.}-{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
__lock_task_sighand+0x145/0x2d0 kernel/signal.c:1410
lock_task_sighand include/linux/sched/signal.h:745 [inline]
send_sigqueue+0x1de/0x720 kernel/signal.c:1978
posix_timer_event kernel/time/posix-timers.c:354 [inline]
posix_timer_fn+0x186/0x390 kernel/time/posix-timers.c:380
__run_hrtimer kernel/time/hrtimer.c:1686 [inline]
__hrtimer_run_queues+0x5e5/0xe50 kernel/time/hrtimer.c:1750
hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1812
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+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1106
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
lock_acquire+0x26f/0x5a0 kernel/locking/lockdep.c:5666
rcu_lock_acquire include/linux/rcupdate.h:319 [inline]
rcu_read_lock include/linux/rcupdate.h:760 [inline]
is_bpf_text_address+0x3e/0x2a0 kernel/bpf/core.c:731
kernel_text_address+0x9f/0xd0 kernel/extable.c:125
__kernel_text_address+0x9/0x40 kernel/extable.c:79
unwind_get_return_address+0x49/0x80 arch/x86/kernel/unwind_orc.c:323
arch_stack_walk+0xf3/0x140 arch/x86/kernel/stacktrace.c:26
stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/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
anon_vma_chain_alloc mm/rmap.c:141 [inline]
anon_vma_clone+0x94/0x4d0 mm/rmap.c:287
anon_vma_fork+0x83/0x580 mm/rmap.c:350
dup_mmap kernel/fork.c:662 [inline]
dup_mm kernel/fork.c:1540 [inline]
copy_mm+0xc83/0x1990 kernel/fork.c:1589
copy_process+0x19d5/0x4060 kernel/fork.c:2267
kernel_clone+0x222/0x920 kernel/fork.c:2682
__do_sys_clone kernel/fork.c:2823 [inline]
__se_sys_clone kernel/fork.c:2807 [inline]
__x64_sys_clone+0x231/0x280 kernel/fork.c:2807
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_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
__lock_task_sighand+0x145/0x2d0 kernel/signal.c:1410
lock_task_sighand include/linux/sched/signal.h:745 [inline]
send_sigqueue+0x1de/0x720 kernel/signal.c:1978
posix_timer_event kernel/time/posix-timers.c:354 [inline]
posix_timer_fn+0x186/0x390 kernel/time/posix-timers.c:380
__run_hrtimer kernel/time/hrtimer.c:1686 [inline]
__hrtimer_run_queues+0x5e5/0xe50 kernel/time/hrtimer.c:1750
hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1812
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
__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
_raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194
__debug_check_no_obj_freed lib/debugobjects.c:987 [inline]
debug_check_no_obj_freed+0x455/0x4e0 lib/debugobjects.c:1008
slab_free_hook mm/slub.c:1699 [inline]
slab_free_freelist_hook mm/slub.c:1750 [inline]
slab_free mm/slub.c:3661 [inline]
kmem_cache_free+0x241/0x510 mm/slub.c:3683
dst_destroy+0x29e/0x390 net/core/dst.c:123
rt_fibinfo_free_cpus+0x117/0x1b0 net/ipv4/fib_semantics.c:207
fib_nh_common_release+0x11f/0x2e0 net/ipv4/fib_semantics.c:217
fib_nh_release net/ipv4/fib_semantics.c:229 [inline]
free_fib_info_rcu+0xd8/0x490 net/ipv4/fib_semantics.c:241
rcu_do_batch kernel/rcu/tree.c:2296 [inline]
rcu_core+0xad4/0x17e0 kernel/rcu/tree.c:2556
__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
sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
memset_erms+0xb/0x10 arch/x86/lib/memset_64.S:64
__unix_dgram_recvmsg+0xc6/0x1260 net/unix/af_unix.c:2428
____sys_recvmsg+0x285/0x530
___sys_recvmsg net/socket.c:2775 [inline]
do_recvmmsg+0x46d/0xad0 net/socket.c:2869
__sys_recvmmsg net/socket.c:2948 [inline]
__do_sys_recvmmsg net/socket.c:2971 [inline]
__se_sys_recvmmsg net/socket.c:2964 [inline]
__x64_sys_recvmmsg+0x195/0x240 net/socket.c:2964
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_irq include/linux/spinlock_api_smp.h:119 [inline]
_raw_spin_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:170
spin_lock_irq include/linux/spinlock.h:376 [inline]
calculate_sigpending+0x4a/0x80 kernel/signal.c:195
ret_from_fork+0x8/0x30 arch/x86/entry/entry_64.S:292
}
... key at: [<ffffffff8fe9d720>] sighand_ctor.__key+0x0/0x20

the dependencies between the lock to be acquired
and HARDIRQ-irq-unsafe lock:
-> (&stab->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_map_update_common+0x1b6/0x5b0 net/core/sock_map.c:492
sock_map_update_elem_sys+0x55b/0x910 net/core/sock_map.c:581
map_update_elem+0x503/0x680 kernel/bpf/syscall.c:1448
__sys_bpf+0x337/0x6c0 kernel/bpf/syscall.c:4993
__do_sys_bpf kernel/bpf/syscall.c:5109 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5107 [inline]
__x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5107
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_map_delete net/core/sock_map.c:416 [inline]
sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448
0xffffffffa0000682
bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline]
__bpf_prog_run include/linux/filter.h:600 [inline]
bpf_prog_run include/linux/filter.h:607 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline]
bpf_trace_run3+0x231/0x440 kernel/trace/bpf_trace.c:2313
__bpf_trace_kmem_cache_free+0x99/0xc0 include/trace/events/kmem.h:114
trace_kmem_cache_free include/trace/events/kmem.h:114 [inline]
kmem_cache_free+0x418/0x510 mm/slub.c:3682
rcu_do_batch kernel/rcu/tree.c:2296 [inline]
rcu_core+0xad4/0x17e0 kernel/rcu/tree.c:2556
__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
sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
lock_acquire+0x26f/0x5a0 kernel/locking/lockdep.c:5666
rcu_lock_acquire include/linux/rcupdate.h:319 [inline]
rcu_read_lock include/linux/rcupdate.h:760 [inline]
page_ext_get+0x39/0x2a0 mm/page_ext.c:157
page_table_check_set+0x5d/0x6f0 mm/page_table_check.c:109
page_table_check_pte_set include/linux/page_table_check.h:83 [inline]
set_pte_at arch/x86/include/asm/pgtable.h:1009 [inline]
copy_present_pte mm/memory.c:1000 [inline]
copy_pte_range mm/memory.c:1091 [inline]
copy_pmd_range mm/memory.c:1177 [inline]
copy_pud_range mm/memory.c:1214 [inline]
copy_p4d_range mm/memory.c:1238 [inline]
copy_page_range+0x2d50/0x4660 mm/memory.c:1336
dup_mmap kernel/fork.c:696 [inline]
dup_mm kernel/fork.c:1540 [inline]
copy_mm+0xf42/0x1990 kernel/fork.c:1589
copy_process+0x19d5/0x4060 kernel/fork.c:2267
kernel_clone+0x222/0x920 kernel/fork.c:2682
__do_sys_clone kernel/fork.c:2823 [inline]
__se_sys_clone kernel/fork.c:2807 [inline]
__x64_sys_clone+0x231/0x280 kernel/fork.c:2807
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_map_update_common+0x1b6/0x5b0 net/core/sock_map.c:492
sock_map_update_elem_sys+0x55b/0x910 net/core/sock_map.c:581
map_update_elem+0x503/0x680 kernel/bpf/syscall.c:1448
__sys_bpf+0x337/0x6c0 kernel/bpf/syscall.c:4993
__do_sys_bpf kernel/bpf/syscall.c:5109 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5107 [inline]
__x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5107
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: [<ffffffff920ae2e0>] sock_map_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_map_delete net/core/sock_map.c:416 [inline]
sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448
bpf_prog_2c29ac5cdc6b1842+0x3a/0x3e
bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline]
__bpf_prog_run include/linux/filter.h:600 [inline]
bpf_prog_run include/linux/filter.h:607 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline]
bpf_trace_run3+0x231/0x440 kernel/trace/bpf_trace.c:2313
__bpf_trace_kmem_cache_free+0x99/0xc0 include/trace/events/kmem.h:114
trace_kmem_cache_free include/trace/events/kmem.h:114 [inline]
kmem_cache_free+0x418/0x510 mm/slub.c:3682
__sigqueue_free kernel/signal.c:458 [inline]
collect_signal kernel/signal.c:601 [inline]
__dequeue_signal+0x4ac/0x5c0 kernel/signal.c:623
dequeue_signal+0xd4/0x590 kernel/signal.c:643
get_signal+0x5f2/0x17d0 kernel/signal.c:2742
arch_do_signal_or_restart+0xb0/0x1a10 arch/x86/kernel/signal.c:871
exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:87
entry_SYSCALL_64_after_hwframe+0x63/0xcd


stack backtrace:
CPU: 0 PID: 21896 Comm: syz-executor.1 Not tainted 6.1.81-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/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_map_delete net/core/sock_map.c:416 [inline]
sock_map_delete_elem+0x97/0x130 net/core/sock_map.c:448
bpf_prog_2c29ac5cdc6b1842+0x3a/0x3e
bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline]
__bpf_prog_run include/linux/filter.h:600 [inline]
bpf_prog_run include/linux/filter.h:607 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline]
bpf_trace_run3+0x231/0x440 kernel/trace/bpf_trace.c:2313
__bpf_trace_kmem_cache_free+0x99/0xc0 include/trace/events/kmem.h:114
trace_kmem_cache_free include/trace/events/kmem.h:114 [inline]
kmem_cache_free+0x418/0x510 mm/slub.c:3682
__sigqueue_free kernel/signal.c:458 [inline]
collect_signal kernel/signal.c:601 [inline]
__dequeue_signal+0x4ac/0x5c0 kernel/signal.c:623
dequeue_signal+0xd4/0x590 kernel/signal.c:643
get_signal+0x5f2/0x17d0 kernel/signal.c:2742
arch_do_signal_or_restart+0xb0/0x1a10 arch/x86/kernel/signal.c:871
exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:87
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f7130e7dda9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f7131b870c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: 0000000020000000 RBX: 00007f7130fabf80 RCX: 00007f7130e7dda9
RDX: 0000000000000001 RSI: 0000000000003000 RDI: 0000000020000000
RBP: 00007f7130eca47a R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000012 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f7130fabf80 R15: 00007fff3c81e168
Reply all
Reply to author
Forward
0 new messages