* [syzbot] [bpf?] possible deadlock in trie_delete_elem
@ 2024-03-20 8:42 syzbot
2024-03-20 10:32 ` Hillf Danton
` (2 more replies)
0 siblings, 3 replies; 23+ messages in thread
From: syzbot @ 2024-03-20 8:42 UTC (permalink / raw)
To: andrii, ast, bpf, daniel, eddyz87, haoluo, john.fastabend, jolsa,
kpsingh, linux-kernel, martin.lau, netdev, sdf, song,
syzkaller-bugs, yonghong.song
Hello,
syzbot found the following issue on:
HEAD commit: 32fa4366cc4d net: phy: fix phy_read_poll_timeout argument ..
git tree: net
console+strace: https://syzkaller.appspot.com/x/log.txt?x=16f5d769180000
kernel config: https://syzkaller.appspot.com/x/.config?x=6fb1be60a193d440
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14572985180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1676fc6e180000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/bb05871df8fc/disk-32fa4366.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a774323fb6ec/vmlinux-32fa4366.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1742ae20d76c/bzImage-32fa4366.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+9d95beb2a3c260622518@syzkaller.appspotmail.com
============================================
WARNING: possible recursive locking detected
6.8.0-syzkaller-05242-g32fa4366cc4d #0 Not tainted
--------------------------------------------
syz-executor217/5072 is trying to acquire lock:
ffff88802a0fd9f8 (&trie->lock){....}-{2:2}, at: trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:451
but task is already holding lock:
ffff88802a0fc9f8 (&trie->lock){....}-{2:2}, at: trie_update_elem+0xcb/0xc10 kernel/bpf/lpm_trie.c:324
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&trie->lock);
lock(&trie->lock);
*** DEADLOCK ***
May be due to missing lock nesting notation
3 locks held by syz-executor217/5072:
#0: ffffffff8e131920 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:298 [inline]
#0: ffffffff8e131920 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:750 [inline]
#0: ffffffff8e131920 (rcu_read_lock){....}-{1:2}, at: bpf_map_update_value+0x3c4/0x540 kernel/bpf/syscall.c:202
#1: ffff88802a0fc9f8 (&trie->lock){....}-{2:2}, at: trie_update_elem+0xcb/0xc10 kernel/bpf/lpm_trie.c:324
#2: ffffffff8e131920 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:298 [inline]
#2: ffffffff8e131920 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:750 [inline]
#2: ffffffff8e131920 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline]
#2: ffffffff8e131920 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x16e/0x490 kernel/trace/bpf_trace.c:2422
stack backtrace:
CPU: 0 PID: 5072 Comm: syz-executor217 Not tainted 6.8.0-syzkaller-05242-g32fa4366cc4d #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+0x1e7/0x2e0 lib/dump_stack.c:106
check_deadlock kernel/locking/lockdep.c:3062 [inline]
validate_chain+0x15c1/0x58e0 kernel/locking/lockdep.c:3856
__lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:451
bpf_prog_2c29ac5cdc6b1842+0x42/0x46
bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline]
__bpf_prog_run include/linux/filter.h:657 [inline]
bpf_prog_run include/linux/filter.h:664 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline]
bpf_trace_run4+0x25a/0x490 kernel/trace/bpf_trace.c:2422
trace_mm_page_alloc include/trace/events/kmem.h:177 [inline]
__alloc_pages+0x657/0x680 mm/page_alloc.c:4591
__alloc_pages_node include/linux/gfp.h:238 [inline]
alloc_pages_node include/linux/gfp.h:261 [inline]
__kmalloc_large_node+0x91/0x1f0 mm/slub.c:3926
__do_kmalloc_node mm/slub.c:3969 [inline]
__kmalloc_node+0x33c/0x4e0 mm/slub.c:3988
kmalloc_node include/linux/slab.h:610 [inline]
bpf_map_kmalloc_node+0xd3/0x1c0 kernel/bpf/syscall.c:422
lpm_trie_node_alloc kernel/bpf/lpm_trie.c:291 [inline]
trie_update_elem+0x1d3/0xc10 kernel/bpf/lpm_trie.c:333
bpf_map_update_value+0x4d3/0x540 kernel/bpf/syscall.c:203
map_update_elem+0x53a/0x6f0 kernel/bpf/syscall.c:1641
__sys_bpf+0x76f/0x810 kernel/bpf/syscall.c:5619
__do_sys_bpf kernel/bpf/syscall.c:5738 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5736 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5736
do_syscall_64+0xfb/0x240
entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7f933485e7a9
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 00 00 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc8852b528 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX:
---
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 syzkaller@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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
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
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
2024-03-20 8:42 syzbot
@ 2024-03-20 10:32 ` Hillf Danton
2024-03-20 19:42 ` syzbot
2024-03-20 14:20 ` syzbot
2025-05-08 7:13 ` syzbot
2 siblings, 1 reply; 23+ messages in thread
From: Hillf Danton @ 2024-03-20 10:32 UTC (permalink / raw)
To: syzbot; +Cc: linux-kernel, syzkaller-bugs
On Wed, 20 Mar 2024 01:42:21 -0700
> syzbot found the following issue on:
>
> HEAD commit: 32fa4366cc4d net: phy: fix phy_read_poll_timeout argument ..
> git tree: net
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1676fc6e180000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git 32fa4366cc4d
--- x/kernel/bpf/lpm_trie.c
+++ y/kernel/bpf/lpm_trie.c
@@ -321,7 +321,7 @@ static long trie_update_elem(struct bpf_
if (key->prefixlen > trie->max_prefixlen)
return -EINVAL;
- spin_lock_irqsave(&trie->lock, irq_flags);
+ spin_lock_irqsave_nested(&trie->lock, irq_flags, 1);
/* Allocate and fill a new node */
@@ -448,7 +448,7 @@ static long trie_delete_elem(struct bpf_
if (key->prefixlen > trie->max_prefixlen)
return -EINVAL;
- spin_lock_irqsave(&trie->lock, irq_flags);
+ spin_lock_irqsave_nested(&trie->lock, irq_flags, 2);
/* Walk the tree looking for an exact key/length match and keeping
* track of the path we traverse. We will need to know the node
--
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
2024-03-20 8:42 syzbot
2024-03-20 10:32 ` Hillf Danton
@ 2024-03-20 14:20 ` syzbot
2025-05-08 7:13 ` syzbot
2 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-03-20 14:20 UTC (permalink / raw)
To: andrii, ast, bpf, daniel, eddyz87, elic, haoluo, hdanton,
jasowang, john.fastabend, jolsa, kafai, kpsingh, linux-kernel,
martin.lau, mst, netdev, parav, sdf, song, songliubraving,
syzkaller-bugs, yhs, yonghong.song
syzbot has bisected this issue to:
commit a3c06ae158dd6fa8336157c31d9234689d068d02
Author: Parav Pandit <parav@nvidia.com>
Date: Tue Jan 5 10:32:03 2021 +0000
vdpa_sim_net: Add support for user supported devices
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1626def1180000
start commit: f6e922365faf xsk: Don't assume metadata is always requeste..
git tree: bpf
final oops: https://syzkaller.appspot.com/x/report.txt?x=1526def1180000
console output: https://syzkaller.appspot.com/x/log.txt?x=1126def1180000
kernel config: https://syzkaller.appspot.com/x/.config?x=6fb1be60a193d440
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14115c6e180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=124fd231180000
Reported-by: syzbot+9d95beb2a3c260622518@syzkaller.appspotmail.com
Fixes: a3c06ae158dd ("vdpa_sim_net: Add support for user supported devices")
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
2024-03-20 10:32 ` Hillf Danton
@ 2024-03-20 19:42 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-03-20 19:42 UTC (permalink / raw)
To: hdanton, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-and-tested-by: syzbot+9d95beb2a3c260622518@syzkaller.appspotmail.com
Tested on:
commit: 32fa4366 net: phy: fix phy_read_poll_timeout argument ..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
console output: https://syzkaller.appspot.com/x/log.txt?x=174f8dc9180000
kernel config: https://syzkaller.appspot.com/x/.config?x=6fb1be60a193d440
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=1600783a180000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <PN2PR01MB489171CD7B0E226F8256C23DFCF92@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-05 7:17 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-05 7:17 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs, wojciech.gladysz
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to checkout kernel repo https://github.com/torvalds/linux.git on commit e377d803b65ee4130213b3c041fc25fdfec1bd90: failed to run ["git" "fetch" "--force" "--tags" "aa24f7914cebcc04de6104c814c089815e172c16" "e377d803b65ee4130213b3c041fc25fdfec1bd90"]: exit status 128
fatal: remote error: upload-pack: not our ref e377d803b65ee4130213b3c041fc25fdfec1bd90
Tested on:
commit: [unknown
git tree: https://github.com/torvalds/linux.git e377d803b65ee4130213b3c041fc25fdfec1bd90
kernel config: https://syzkaller.appspot.com/x/.config?x=9d7ea7de0cb32587
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler:
Note: no patches were applied.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <PN2PR01MB489119119088A1E7091BB6B9FCF92@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-05 7:39 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-05 7:39 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs, wojciech.gladysz
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
possible deadlock in trie_delete_elem
============================================
WARNING: possible recursive locking detected
6.10.0-rc2-syzkaller-00001-ge377d803b65e #0 Not tainted
--------------------------------------------
udevd/5414 is trying to acquire lock:
ffff88807eff51f8 (&trie->lock){-.-.}-{2:2}, at: trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
but task is already holding lock:
ffff88807eff59f8 (&trie->lock){-.-.}-{2:2}, at: trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&trie->lock);
lock(&trie->lock);
*** DEADLOCK ***
May be due to missing lock nesting notation
5 locks held by udevd/5414:
#0: ffff88801f3e8f08 (kn->active#5){.+.+}-{0:0}, at: kernfs_fop_open+0x93/0xd10 fs/kernfs/file.c:601
#1: ffff8880162ecc38 (&kernfs_locks->open_file_mutex[count]){+.+.}-{3:3}, at: kernfs_open_file_mutex_lock fs/kernfs/file.c:56 [inline]
#1: ffff8880162ecc38 (&kernfs_locks->open_file_mutex[count]){+.+.}-{3:3}, at: kernfs_get_open_node fs/kernfs/file.c:520 [inline]
#1: ffff8880162ecc38 (&kernfs_locks->open_file_mutex[count]){+.+.}-{3:3}, at: kernfs_fop_open+0x74d/0xd10 fs/kernfs/file.c:700
#2: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
#2: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
#2: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2409 [inline]
#2: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x21f/0x570 kernel/trace/bpf_trace.c:2451
#3: ffff88807eff59f8 (&trie->lock){-.-.}-{2:2}, at: trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
#4: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
#4: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
#4: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2409 [inline]
#4: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x21f/0x570 kernel/trace/bpf_trace.c:2451
stack backtrace:
CPU: 1 PID: 5414 Comm: udevd Not tainted 6.10.0-rc2-syzkaller-00001-ge377d803b65e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
check_deadlock kernel/locking/lockdep.c:3062 [inline]
validate_chain+0x15d3/0x5900 kernel/locking/lockdep.c:3856
__lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
bpf_prog_1db1603a7cfa36fb+0x45/0x49
bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline]
__bpf_prog_run include/linux/filter.h:691 [inline]
bpf_prog_run include/linux/filter.h:698 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2410 [inline]
bpf_trace_run2+0x30d/0x570 kernel/trace/bpf_trace.c:2451
__traceiter_contention_end+0x7b/0xb0 include/trace/events/lock.h:122
trace_contention_end+0x114/0x140 include/trace/events/lock.h:122
__pv_queued_spin_lock_slowpath+0xb81/0xdc0 kernel/locking/qspinlock.c:557
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [inline]
queued_spin_lock_slowpath+0x42/0x50 arch/x86/include/asm/qspinlock.h:51
queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
do_raw_spin_lock+0x272/0x370 kernel/locking/spinlock_debug.c:116
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0xe1/0x120 kernel/locking/spinlock.c:162
trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
bpf_prog_1db1603a7cfa36fb+0x45/0x49
bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline]
__bpf_prog_run include/linux/filter.h:691 [inline]
bpf_prog_run include/linux/filter.h:698 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2410 [inline]
bpf_trace_run2+0x30d/0x570 kernel/trace/bpf_trace.c:2451
__traceiter_contention_end+0x7b/0xb0 include/trace/events/lock.h:122
trace_contention_end+0xf5/0x120 include/trace/events/lock.h:122
__mutex_lock_common kernel/locking/mutex.c:617 [inline]
__mutex_lock+0x2e5/0xd70 kernel/locking/mutex.c:752
kernfs_open_file_mutex_lock fs/kernfs/file.c:56 [inline]
kernfs_get_open_node fs/kernfs/file.c:520 [inline]
kernfs_fop_open+0x74d/0xd10 fs/kernfs/file.c:700
do_dentry_open+0x95a/0x1720 fs/open.c:955
do_open fs/namei.c:3650 [inline]
path_openat+0x289f/0x3280 fs/namei.c:3807
do_filp_open+0x235/0x490 fs/namei.c:3834
do_sys_openat2+0x13e/0x1d0 fs/open.c:1405
do_sys_open fs/open.c:1420 [inline]
__do_sys_openat fs/open.c:1436 [inline]
__se_sys_openat fs/open.c:1431 [inline]
__x64_sys_openat+0x247/0x2a0 fs/open.c:1431
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7f17b169a4
Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007ffdf6fcc1a0 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007f7f17b169a4
RDX: 0000000000080000 RSI: 00007ffdf6fcc2d8 RDI: 00000000ffffff9c
RBP: 00007ffdf6fcc2d8 R08: 0000000000000008 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080000
R13: 000056111e750b42 R14: 0000000000000001 R15: 000056111e76c160
</TASK>
Tested on:
commit: e377d803 kernel/trace: fix possible deadlock in trie_d..
git tree: https://linux.googlesource.com/linux/kernel/git/torvalds/linux
console output: https://syzkaller.appspot.com/x/log.txt?x=111a49bc980000
kernel config: https://syzkaller.appspot.com/x/.config?x=eb72437243175f22
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
Note: no patches were applied.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <PN2PR01MB4891734D357ACCDDD106F360FCF92@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-05 7:57 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-05 7:57 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs, wojciech.gladysz
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
possible deadlock in trie_delete_elem
============================================
WARNING: possible recursive locking detected
6.10.0-rc2-syzkaller-00001-ge377d803b65e #0 Not tainted
--------------------------------------------
syz-executor.0/6233 is trying to acquire lock:
ffff88802e83a1f8 (&trie->lock){-.-.}-{2:2}, at: trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
but task is already holding lock:
ffff8880696e91f8 (&trie->lock){-.-.}-{2:2}, at: trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&trie->lock);
lock(&trie->lock);
*** DEADLOCK ***
May be due to missing lock nesting notation
4 locks held by syz-executor.0/6233:
#0: ffffffff8e3809a8 (tracepoints_mutex){+.+.}-{3:3}, at: tracepoint_probe_unregister+0x32/0x990 kernel/tracepoint.c:548
#1: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
#1: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
#1: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2409 [inline]
#1: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x21f/0x570 kernel/trace/bpf_trace.c:2451
#2: ffff8880696e91f8 (&trie->lock){-.-.}-{2:2}, at: trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
#3: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
#3: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
#3: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2409 [inline]
#3: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x21f/0x570 kernel/trace/bpf_trace.c:2451
stack backtrace:
CPU: 0 PID: 6233 Comm: syz-executor.0 Not tainted 6.10.0-rc2-syzkaller-00001-ge377d803b65e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
check_deadlock kernel/locking/lockdep.c:3062 [inline]
validate_chain+0x15d3/0x5900 kernel/locking/lockdep.c:3856
__lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
bpf_prog_1db1603a7cfa36fb+0x45/0x49
bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline]
__bpf_prog_run include/linux/filter.h:691 [inline]
bpf_prog_run include/linux/filter.h:698 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2410 [inline]
bpf_trace_run2+0x30d/0x570 kernel/trace/bpf_trace.c:2451
__traceiter_contention_end+0x7b/0xb0 include/trace/events/lock.h:122
trace_contention_end+0x114/0x140 include/trace/events/lock.h:122
__pv_queued_spin_lock_slowpath+0xb81/0xdc0 kernel/locking/qspinlock.c:557
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [inline]
queued_spin_lock_slowpath+0x42/0x50 arch/x86/include/asm/qspinlock.h:51
queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
do_raw_spin_lock+0x272/0x370 kernel/locking/spinlock_debug.c:116
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0xe1/0x120 kernel/locking/spinlock.c:162
trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
bpf_prog_1db1603a7cfa36fb+0x45/0x49
bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline]
__bpf_prog_run include/linux/filter.h:691 [inline]
bpf_prog_run include/linux/filter.h:698 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2410 [inline]
bpf_trace_run2+0x30d/0x570 kernel/trace/bpf_trace.c:2451
__traceiter_contention_end+0x7b/0xb0 include/trace/events/lock.h:122
trace_contention_end+0xf5/0x120 include/trace/events/lock.h:122
__mutex_lock_common kernel/locking/mutex.c:617 [inline]
__mutex_lock+0x2e5/0xd70 kernel/locking/mutex.c:752
tracepoint_probe_unregister+0x32/0x990 kernel/tracepoint.c:548
bpf_raw_tp_link_release+0x45/0x70 kernel/bpf/syscall.c:3519
bpf_link_free+0x10e/0x2d0 kernel/bpf/syscall.c:3065
bpf_link_put_direct kernel/bpf/syscall.c:3106 [inline]
bpf_link_release+0x7b/0x90 kernel/bpf/syscall.c:3113
__fput+0x406/0x8b0 fs/file_table.c:422
__do_sys_close fs/open.c:1555 [inline]
__se_sys_close fs/open.c:1540 [inline]
__x64_sys_close+0x7f/0x110 fs/open.c:1540
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7ed1e7cb9a
Code: 48 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c 24 0c e8 03 7f 02 00 8b 7c 24 0c 89 c2 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 36 89 d7 89 44 24 0c e8 63 7f 02 00 8b 44 24
RSP: 002b:00007ffead8b0970 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 0000000000000007 RCX: 00007f7ed1e7cb9a
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006
RBP: 00007ffead8b0a48 R08: 00007f7ed1e00000 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000293 R12: 000000000001abb1
R13: 00007f7ed1fabf8c R14: 00007f7ed1fabf80 R15: 0000000000000226
</TASK>
Tested on:
commit: e377d803 kernel/trace: fix possible deadlock in trie_d..
git tree: https://linux.googlesource.com/linux/kernel/git/torvalds/linux
console output: https://syzkaller.appspot.com/x/log.txt?x=12178036980000
kernel config: https://syzkaller.appspot.com/x/.config?x=eb72437243175f22
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
Note: no patches were applied.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <PN2PR01MB4891BF795360AE31E349CFECFCF92@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-05 8:24 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-05 8:24 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs, wojciech.gladysz
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
possible deadlock in trie_delete_elem
============================================
WARNING: possible recursive locking detected
6.10.0-rc2-syzkaller-00022-g32f88d65f01b #0 Not tainted
--------------------------------------------
syz-executor.1/6309 is trying to acquire lock:
ffff88802e40e1f8 (&trie->lock){-.-.}-{2:2}, at: trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
but task is already holding lock:
ffff88802e40c1f8 (&trie->lock){-.-.}-{2:2}, at: trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&trie->lock);
lock(&trie->lock);
*** DEADLOCK ***
May be due to missing lock nesting notation
4 locks held by syz-executor.1/6309:
#0: ffff88807ada5090 (&child->perf_event_mutex){+.+.}-{3:3}, at: perf_event_exit_task+0x9b/0xaa0 kernel/events/core.c:13184
#1: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
#1: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
#1: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline]
#1: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2444
#2: ffff88802e40c1f8 (&trie->lock){-.-.}-{2:2}, at: trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
#3: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
#3: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
#3: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline]
#3: ffffffff8e333f60 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2444
stack backtrace:
CPU: 1 PID: 6309 Comm: syz-executor.1 Not tainted 6.10.0-rc2-syzkaller-00022-g32f88d65f01b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
check_deadlock kernel/locking/lockdep.c:3062 [inline]
validate_chain+0x15d3/0x5900 kernel/locking/lockdep.c:3856
__lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
bpf_prog_1db1603a7cfa36fb+0x45/0x49
bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline]
__bpf_prog_run include/linux/filter.h:691 [inline]
bpf_prog_run include/linux/filter.h:698 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2403 [inline]
bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2444
__traceiter_contention_end+0x7b/0xb0 include/trace/events/lock.h:122
trace_contention_end+0x114/0x140 include/trace/events/lock.h:122
__pv_queued_spin_lock_slowpath+0xb81/0xdc0 kernel/locking/qspinlock.c:557
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [inline]
queued_spin_lock_slowpath+0x42/0x50 arch/x86/include/asm/qspinlock.h:51
queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
do_raw_spin_lock+0x272/0x370 kernel/locking/spinlock_debug.c:116
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0xe1/0x120 kernel/locking/spinlock.c:162
trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
bpf_prog_1db1603a7cfa36fb+0x45/0x49
bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline]
__bpf_prog_run include/linux/filter.h:691 [inline]
bpf_prog_run include/linux/filter.h:698 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2403 [inline]
bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2444
__traceiter_contention_end+0x7b/0xb0 include/trace/events/lock.h:122
trace_contention_end+0xf5/0x120 include/trace/events/lock.h:122
__mutex_lock_common kernel/locking/mutex.c:617 [inline]
__mutex_lock+0x2e5/0xd70 kernel/locking/mutex.c:752
perf_event_exit_task+0x9b/0xaa0 kernel/events/core.c:13184
do_exit+0xa37/0x27e0 kernel/exit.c:883
do_group_exit+0x207/0x2c0 kernel/exit.c:1023
__do_sys_exit_group kernel/exit.c:1034 [inline]
__se_sys_exit_group kernel/exit.c:1032 [inline]
__x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1032
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7af347dca9
Code: Unable to access opcode bytes at 0x7f7af347dc7f.
RSP: 002b:00007ffc344b9708 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 000000000000001e RCX: 00007f7af347dca9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000
R10: 00007f7af3400000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000000
</TASK>
Tested on:
commit: 32f88d65 Merge tag 'linux_kselftest-fixes-6.10-rc3' of..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=162ace06980000
kernel config: https://syzkaller.appspot.com/x/.config?x=eb72437243175f22
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
Note: no patches were applied.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <PN2PR01MB4891AE31D63427B828C79ECBFCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-06 9:27 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-06 9:27 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs, wojciech.gladysz
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file kernel/trace/bpf_trace.c
patch: **** malformed patch at line 7: @@ -67,7 +67,7 @@ static void tp_rcu_cond_sync(enum tp_transition_sync sync)
Tested on:
commit: e377d803 kernel/trace: fix possible deadlock in trie_d..
git tree: https://linux.googlesource.com/linux/kernel/git/torvalds/linux
kernel config: https://syzkaller.appspot.com/x/.config?x=9d7ea7de0cb32587
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=13dfb85a980000
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <PN2PR01MB48911035081582F4B9893F9FFCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-06 11:47 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-06 11:47 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs, wojciech.gladysz
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file kernel/trace/bpf_trace.c
patch: **** malformed patch at line 7: diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
Tested on:
commit: e377d803 kernel/trace: fix possible deadlock in trie_d..
git tree: https://linux.googlesource.com/linux/kernel/git/torvalds/linux
kernel config: https://syzkaller.appspot.com/x/.config?x=9d7ea7de0cb32587
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=119fb274980000
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <PN2PR01MB489190072C2A23C3C1CCCE2FFCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-06 12:12 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-06 12:12 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs, wojciech.gladysz
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file kernel/trace/bpf_trace.c
patch: **** malformed patch at line 7: @@ -298,6 +308,8 @@ static enum tp_func_state nr_func_state(const
Tested on:
commit: e377d803 kernel/trace: fix possible deadlock in trie_d..
git tree: https://linux.googlesource.com/linux/kernel/git/torvalds/linux
kernel config: https://syzkaller.appspot.com/x/.config?x=9d7ea7de0cb32587
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=109b9a16980000
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <PN2PR01MB489159F2619858474EF92FC5FCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-06 12:32 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-06 12:32 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs, wojciech.gladysz
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
patch: **** Only garbage was found in the patch input.
Tested on:
commit: e377d803 kernel/trace: fix possible deadlock in trie_d..
git tree: https://linux.googlesource.com/linux/kernel/git/torvalds/linux
kernel config: https://syzkaller.appspot.com/x/.config?x=9d7ea7de0cb32587
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=1038e65a980000
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <PN2PR01MB4891F53CC6107BBDB25C8C09FCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-06 13:10 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-06 13:10 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs, wojciech.gladysz
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file kernel/trace/bpf_trace.c
patch: **** malformed patch at line 7: diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
Tested on:
commit: e377d803 kernel/trace: fix possible deadlock in trie_d..
git tree: https://linux.googlesource.com/linux/kernel/git/torvalds/linux
kernel config: https://syzkaller.appspot.com/x/.config?x=9d7ea7de0cb32587
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=170e179a980000
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <PN2PR01MB489146FC0041ED737236BE64FCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-06 13:17 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-06 13:17 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs, wojciech.gladysz
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file kernel/trace/bpf_trace.c
patch: **** malformed patch at line 7: diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
Tested on:
commit: e377d803 kernel/trace: fix possible deadlock in trie_d..
git tree: https://linux.googlesource.com/linux/kernel/git/torvalds/linux
kernel config: https://syzkaller.appspot.com/x/.config?x=9d7ea7de0cb32587
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=14224362980000
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <PN2PR01MB4891DFF0F26C14B0A7ED225EFCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-06 13:39 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-06 13:39 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs, wojciech.gladysz
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file kernel/trace/bpf_trace.c
patch: **** malformed patch at line 5: diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
Tested on:
commit: e377d803 kernel/trace: fix possible deadlock in trie_d..
git tree: https://linux.googlesource.com/linux/kernel/git/torvalds/linux
kernel config: https://syzkaller.appspot.com/x/.config?x=9d7ea7de0cb32587
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=13052b4a980000
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <MAXPR01MB316750CFC54579A6A384FF91F7FA2@MAXPR01MB3167.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-06 13:40 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-06 13:40 UTC (permalink / raw)
To: linux-kernel, norbert.kaminski, syzkaller-bugs, wojciech.gladysz
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file kernel/trace/bpf_trace.c
patch: **** malformed patch at line 7: diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
Tested on:
commit: e377d803 kernel/trace: fix possible deadlock in trie_d..
git tree: https://linux.googlesource.com/linux/kernel/git/torvalds/linux
kernel config: https://syzkaller.appspot.com/x/.config?x=9d7ea7de0cb32587
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=10d9f026980000
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <20240606135139.134172-1-norkam41@gmail.com>
@ 2024-06-06 13:55 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-06 13:55 UTC (permalink / raw)
To: linux-kernel, norkam41, syzkaller-bugs
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file kernel/trace/bpf_trace.c
patch: **** malformed patch at line 7: diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
Tested on:
commit: e377d803 kernel/trace: fix possible deadlock in trie_d..
git tree: https://linux.googlesource.com/linux/kernel/git/torvalds/linux
kernel config: https://syzkaller.appspot.com/x/.config?x=9d7ea7de0cb32587
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=150d9422980000
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <20240606140352.135948-1-norkam41@gmail.com>
@ 2024-06-06 14:26 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-06 14:26 UTC (permalink / raw)
To: linux-kernel, norkam41, syzkaller-bugs
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file kernel/trace/bpf_trace.c
patch: **** malformed patch at line 7: diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
Tested on:
commit: e377d803 kernel/trace: fix possible deadlock in trie_d..
git tree: https://linux.googlesource.com/linux/kernel/git/torvalds/linux
kernel config: https://syzkaller.appspot.com/x/.config?x=9d7ea7de0cb32587
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=10fb9a16980000
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <20240606141413.137516-1-norkam41@gmail.com>
@ 2024-06-06 14:38 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-06 14:38 UTC (permalink / raw)
To: linux-kernel, norkam41, syzkaller-bugs
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
kernel/tracepoint.c:178:36: error: incomplete definition of type 'struct bpf_raw_tp_link'
kernel/tracepoint.c:182:9: error: incomplete definition of type 'struct bpf_raw_tp_link'
Tested on:
commit: c3f38fa6 Linux 6.10-rc2
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel config: https://syzkaller.appspot.com/x/.config?x=9d7ea7de0cb32587
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=15bfdbc2980000
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
[not found] <PN2PR01MB4891E7B8CF9B3C1531CB9ADEFCFB2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
@ 2024-06-07 7:45 ` syzbot
0 siblings, 0 replies; 23+ messages in thread
From: syzbot @ 2024-06-07 7:45 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs, wojciech.gladysz
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-and-tested-by: syzbot+9d95beb2a3c260622518@syzkaller.appspotmail.com
Tested on:
commit: 58fa9471 kernel/trace: fix possible deadlock in trie_d..
git tree: https://linux.googlesource.com/linux/kernel/git/torvalds/linux
console output: https://syzkaller.appspot.com/x/log.txt?x=10e2e6f6980000
kernel config: https://syzkaller.appspot.com/x/.config?x=eb72437243175f22
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
Note: no patches were applied.
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
2024-03-20 8:42 syzbot
2024-03-20 10:32 ` Hillf Danton
2024-03-20 14:20 ` syzbot
@ 2025-05-08 7:13 ` syzbot
2025-05-08 18:00 ` Alexei Starovoitov
2025-05-08 23:39 ` Kumar Kartikeya Dwivedi
2 siblings, 2 replies; 23+ messages in thread
From: syzbot @ 2025-05-08 7:13 UTC (permalink / raw)
To: andrii, ast, bpf, daniel, eddyz87, elic, haoluo, hdanton,
jasowang, john.fastabend, jolsa, kafai, kpsingh, linux-kernel,
linux-trace-kernel, lkp, llvm, martin.lau, mathieu.desnoyers,
memxor, mhiramat, michal.kukowski, michal.switala, mst, netdev,
norbert.kaminski, norbert.kaminski, norkam41, oe-kbuild-all,
parav, rostedt, sdf, sdf, song, songliubraving, syzkaller-bugs,
wojciech.gladysz, yhs, yonghong.song
syzbot suspects this issue was fixed by commit:
commit 47979314c0fe245ed54306e2f91b3f819c7c0f9f
Author: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Date: Sun Mar 16 04:05:37 2025 +0000
bpf: Convert lpm_trie.c to rqspinlock
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=140598f4580000
start commit: c2933b2befe2 Merge tag 'net-6.14-rc1' of git://git.kernel...
git tree: net-next
kernel config: https://syzkaller.appspot.com/x/.config?x=d033b14aeef39158
dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=108e1724580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=177035f8580000
If the result looks correct, please mark the issue as fixed by replying with:
#syz fix: bpf: Convert lpm_trie.c to rqspinlock
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
2025-05-08 7:13 ` syzbot
@ 2025-05-08 18:00 ` Alexei Starovoitov
2025-05-08 23:39 ` Kumar Kartikeya Dwivedi
1 sibling, 0 replies; 23+ messages in thread
From: Alexei Starovoitov @ 2025-05-08 18:00 UTC (permalink / raw)
To: syzbot
Cc: Andrii Nakryiko, Alexei Starovoitov, bpf, Daniel Borkmann, Eduard,
elic, Hao Luo, Hillf Danton, Jason Wang, John Fastabend,
Jiri Olsa, Martin KaFai Lau, KP Singh, LKML, linux-trace-kernel,
kbuild test robot, clang-built-linux, Martin KaFai Lau,
Mathieu Desnoyers, Kumar Kartikeya Dwivedi, Masami Hiramatsu,
michal.kukowski, Michal Switala, Michael S. Tsirkin,
Network Development, norbert.kaminski, norbert.kaminski, norkam41,
oe-kbuild-all, parav, Steven Rostedt, Stanislav Fomichev,
Stanislav Fomichev, Song Liu, Song Liu, syzkaller-bugs,
Wojciech Gładysz, Yonghong Song, Yonghong Song
On Thu, May 8, 2025 at 12:13 AM syzbot
<syzbot+9d95beb2a3c260622518@syzkaller.appspotmail.com> wrote:
>
> syzbot suspects this issue was fixed by commit:
>
> commit 47979314c0fe245ed54306e2f91b3f819c7c0f9f
> Author: Kumar Kartikeya Dwivedi <memxor@gmail.com>
> Date: Sun Mar 16 04:05:37 2025 +0000
>
> bpf: Convert lpm_trie.c to rqspinlock
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=140598f4580000
> start commit: c2933b2befe2 Merge tag 'net-6.14-rc1' of git://git.kernel...
> git tree: net-next
> kernel config: https://syzkaller.appspot.com/x/.config?x=d033b14aeef39158
> dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=108e1724580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=177035f8580000
>
> If the result looks correct, please mark the issue as fixed by replying with:
yes.
#syz fix: bpf: Convert lpm_trie.c to rqspinlock
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
2025-05-08 7:13 ` syzbot
2025-05-08 18:00 ` Alexei Starovoitov
@ 2025-05-08 23:39 ` Kumar Kartikeya Dwivedi
1 sibling, 0 replies; 23+ messages in thread
From: Kumar Kartikeya Dwivedi @ 2025-05-08 23:39 UTC (permalink / raw)
To: syzbot
Cc: andrii, ast, bpf, daniel, eddyz87, elic, haoluo, hdanton,
jasowang, john.fastabend, jolsa, kafai, kpsingh, linux-kernel,
linux-trace-kernel, lkp, llvm, martin.lau, mathieu.desnoyers,
mhiramat, michal.kukowski, michal.switala, mst, netdev,
norbert.kaminski, norbert.kaminski, norkam41, oe-kbuild-all,
parav, rostedt, sdf, sdf, song, songliubraving, syzkaller-bugs,
wojciech.gladysz, yhs, yonghong.song
#syz fix: bpf: Convert lpm_trie.c to rqspinlock
On Thu, 8 May 2025 at 09:21, syzbot
<syzbot+9d95beb2a3c260622518@syzkaller.appspotmail.com> wrote:
>
> syzbot suspects this issue was fixed by commit:
>
> commit 47979314c0fe245ed54306e2f91b3f819c7c0f9f
> Author: Kumar Kartikeya Dwivedi <memxor@gmail.com>
> Date: Sun Mar 16 04:05:37 2025 +0000
>
> bpf: Convert lpm_trie.c to rqspinlock
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=140598f4580000
> start commit: c2933b2befe2 Merge tag 'net-6.14-rc1' of git://git.kernel...
> git tree: net-next
> kernel config: https://syzkaller.appspot.com/x/.config?x=d033b14aeef39158
> dashboard link: https://syzkaller.appspot.com/bug?extid=9d95beb2a3c260622518
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=108e1724580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=177035f8580000
>
> If the result looks correct, please mark the issue as fixed by replying with:
>
> #syz fix: bpf: Convert lpm_trie.c to rqspinlock
>
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection
>
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2025-05-08 23:40 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <PN2PR01MB48911035081582F4B9893F9FFCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06 11:47 ` [syzbot] [bpf?] possible deadlock in trie_delete_elem syzbot
[not found] <PN2PR01MB4891E7B8CF9B3C1531CB9ADEFCFB2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-07 7:45 ` syzbot
[not found] <20240606141413.137516-1-norkam41@gmail.com>
2024-06-06 14:38 ` syzbot
[not found] <20240606140352.135948-1-norkam41@gmail.com>
2024-06-06 14:26 ` syzbot
[not found] <20240606135139.134172-1-norkam41@gmail.com>
2024-06-06 13:55 ` syzbot
[not found] <MAXPR01MB316750CFC54579A6A384FF91F7FA2@MAXPR01MB3167.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06 13:40 ` syzbot
[not found] <PN2PR01MB4891DFF0F26C14B0A7ED225EFCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06 13:39 ` syzbot
[not found] <PN2PR01MB489146FC0041ED737236BE64FCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06 13:17 ` syzbot
[not found] <PN2PR01MB4891F53CC6107BBDB25C8C09FCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06 13:10 ` syzbot
[not found] <PN2PR01MB489159F2619858474EF92FC5FCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06 12:32 ` syzbot
[not found] <PN2PR01MB489190072C2A23C3C1CCCE2FFCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06 12:12 ` syzbot
[not found] <PN2PR01MB4891AE31D63427B828C79ECBFCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06 9:27 ` syzbot
[not found] <PN2PR01MB4891BF795360AE31E349CFECFCF92@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-05 8:24 ` syzbot
[not found] <PN2PR01MB4891734D357ACCDDD106F360FCF92@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-05 7:57 ` syzbot
[not found] <PN2PR01MB489119119088A1E7091BB6B9FCF92@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-05 7:39 ` syzbot
[not found] <PN2PR01MB489171CD7B0E226F8256C23DFCF92@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-05 7:17 ` syzbot
2024-03-20 8:42 syzbot
2024-03-20 10:32 ` Hillf Danton
2024-03-20 19:42 ` syzbot
2024-03-20 14:20 ` syzbot
2025-05-08 7:13 ` syzbot
2025-05-08 18:00 ` Alexei Starovoitov
2025-05-08 23:39 ` Kumar Kartikeya Dwivedi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox