syzbot


WARNING: locking bug in rcu_pending_enqueue

Status: upstream: reported on 2024/11/15 12:29
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+b63566ef71c0f462e815@syzkaller.appspotmail.com
First crash: 69d, last: 13d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] WARNING: locking bug in rcu_pending_enqueue 0 (1) 2024/11/15 12:29

Sample crash report:
------------[ cut here ]------------
Looking for class "p->lock" with key rcu_pending_init.__key, but found a different class "&p->lock" with the same key
WARNING: CPU: 0 PID: 52 at kernel/locking/lockdep.c:939 look_up_lock_class+0xdc/0x170 kernel/locking/lockdep.c:936
Modules linked in:
CPU: 0 UID: 0 PID: 52 Comm: kworker/u8:3 Not tainted 6.13.0-rc5-syzkaller-00163-gab75170520d4 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Workqueue: btree_update btree_interior_update_work
RIP: 0010:look_up_lock_class+0xdc/0x170 kernel/locking/lockdep.c:936
Code: 01 0f 85 8a 00 00 00 c6 05 74 ab 41 04 01 90 49 8b 16 49 8b 76 18 48 8b 8b b8 00 00 00 48 c7 c7 60 ba 0a 8c e8 05 37 9f f5 90 <0f> 0b 90 90 eb 61 90 e8 b8 03 f6 f8 e8 b3 98 be f5 48 c7 c7 a0 b9
RSP: 0018:ffffc90000bc7170 EFLAGS: 00010046
RAX: 4dc903f51570d200 RBX: ffffffff93c61470 RCX: ffff88801daebc00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000bc7280 R08: ffffffff816019a2 R09: 1ffff110170c519a
R10: dffffc0000000000 R11: ffffed10170c519b R12: ffffe8ffffc289c8
R13: ffffe8ffffc289c8 R14: ffffe8ffffc289c8 R15: ffffffff9a51dcc0
FS:  0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000557f32d0d950 CR3: 00000000687b4000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 register_lock_class+0x102/0x980 kernel/locking/lockdep.c:1290
 __lock_acquire+0xf3/0x2100 kernel/locking/lockdep.c:5101
 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849
 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
 _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:351 [inline]
 __rcu_pending_enqueue fs/bcachefs/rcu_pending.c:418 [inline]
 rcu_pending_enqueue+0x1f4/0xac0 fs/bcachefs/rcu_pending.c:515
 bkey_cached_free fs/bcachefs/btree_key_cache.c:115 [inline]
 bch2_btree_key_cache_drop+0x1d1/0x2e0 fs/bcachefs/btree_key_cache.c:586
 bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:824 [inline]
 do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:900 [inline]
 __bch2_trans_commit+0x71a6/0x93c0 fs/bcachefs/btree_trans_commit.c:1121
 bch2_trans_commit fs/bcachefs/btree_update.h:184 [inline]
 btree_update_nodes_written fs/bcachefs/btree_update_interior.c:723 [inline]
 btree_interior_update_work+0x1492/0x2b10 fs/bcachefs/btree_update_interior.c:861
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3310
 worker_thread+0x870/0xd30 kernel/workqueue.c:3391
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/05 19:57 upstream ab75170520d4 f3558dbf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING: locking bug in rcu_pending_enqueue
2024/11/11 12:24 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 563047e691f2 97fe5517 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: locking bug in rcu_pending_enqueue
* Struck through repros no longer work on HEAD.