From: syzbot <syzbot+7836a68852a10ec3d790@syzkaller.appspotmail.com>
To: kent.overstreet@linux.dev, linux-bcachefs@vger.kernel.org,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [bcachefs?] possible deadlock in bch2_symlink
Date: Sat, 08 Feb 2025 01:14:24 -0800 [thread overview]
Message-ID: <67a72070.050a0220.3d72c.0022.GAE@google.com> (raw)
In-Reply-To: <66f9024f.050a0220.aab67.0010.GAE@google.com>
syzbot has found a reproducer for the following issue on:
HEAD commit: 7ee983c850b4 Merge tag 'drm-fixes-2025-02-08' of https://g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17375ca4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=1909f2f0d8e641ce
dashboard link: https://syzkaller.appspot.com/bug?extid=7836a68852a10ec3d790
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=14e0cca4580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=155361b0580000
Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7feb34a89c2a/non_bootable_disk-7ee983c8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f2f78699fc41/vmlinux-7ee983c8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ca55e6e8dd01/bzImage-7ee983c8.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/aa79c539b21d/mount_0.gz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+7836a68852a10ec3d790@syzkaller.appspotmail.com
bcachefs (loop0): reading snapshots table
bcachefs (loop0): reading snapshots done
bcachefs (loop0): done starting filesystem
============================================
WARNING: possible recursive locking detected
6.14.0-rc1-syzkaller-00181-g7ee983c850b4 #0 Not tainted
--------------------------------------------
syz-executor294/5305 is trying to acquire lock:
ffff888044775078 (&sb->s_type->i_mutex_key#16){++++}-{4:4}, at: inode_lock include/linux/fs.h:877 [inline]
ffff888044775078 (&sb->s_type->i_mutex_key#16){++++}-{4:4}, at: bch2_symlink+0x176/0x310 fs/bcachefs/fs.c:839
but task is already holding lock:
ffff888044774148 (&sb->s_type->i_mutex_key#16){++++}-{4:4}, at: inode_lock include/linux/fs.h:877 [inline]
ffff888044774148 (&sb->s_type->i_mutex_key#16){++++}-{4:4}, at: ovl_copy_up_workdir fs/overlayfs/copy_up.c:782 [inline]
ffff888044774148 (&sb->s_type->i_mutex_key#16){++++}-{4:4}, at: ovl_do_copy_up fs/overlayfs/copy_up.c:1001 [inline]
ffff888044774148 (&sb->s_type->i_mutex_key#16){++++}-{4:4}, at: ovl_copy_up_one fs/overlayfs/copy_up.c:1202 [inline]
ffff888044774148 (&sb->s_type->i_mutex_key#16){++++}-{4:4}, at: ovl_copy_up_flags+0x19cb/0x47c0 fs/overlayfs/copy_up.c:1257
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&sb->s_type->i_mutex_key#16);
lock(&sb->s_type->i_mutex_key#16);
*** DEADLOCK ***
May be due to missing lock nesting notation
7 locks held by syz-executor294/5305:
#0: ffff88801df94420 (sb_writers#10){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:547
#1: ffff88804470de50 (&ovl_i_mutex_dir_key[depth]/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:912 [inline]
#1: ffff88804470de50 (&ovl_i_mutex_dir_key[depth]/1){+.+.}-{4:4}, at: lock_rename fs/namei.c:3217 [inline]
#1: ffff88804470de50 (&ovl_i_mutex_dir_key[depth]/1){+.+.}-{4:4}, at: do_renameat2+0x62c/0x13f0 fs/namei.c:5161
#2: ffff88804470e418 (&ovl_i_mutex_key[depth]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:877 [inline]
#2: ffff88804470e418 (&ovl_i_mutex_key[depth]){+.+.}-{4:4}, at: lock_two_nondirectories+0xe1/0x170 fs/inode.c:1281
#3: ffff88804470e9e0 (&ovl_i_mutex_key[depth]/4){+.+.}-{4:4}, at: vfs_rename+0x6a2/0xf00 fs/namei.c:5040
#4: ffff88804470e7d0 (&ovl_i_lock_key[depth]){+.+.}-{4:4}, at: ovl_inode_lock_interruptible fs/overlayfs/overlayfs.h:650 [inline]
#4: ffff88804470e7d0 (&ovl_i_lock_key[depth]){+.+.}-{4:4}, at: ovl_copy_up_start+0x53/0x310 fs/overlayfs/util.c:727
#5: ffff8880477b0420 (sb_writers#9){.+.+}-{0:0}, at: ovl_copy_up_workdir fs/overlayfs/copy_up.c:781 [inline]
#5: ffff8880477b0420 (sb_writers#9){.+.+}-{0:0}, at: ovl_do_copy_up fs/overlayfs/copy_up.c:1001 [inline]
#5: ffff8880477b0420 (sb_writers#9){.+.+}-{0:0}, at: ovl_copy_up_one fs/overlayfs/copy_up.c:1202 [inline]
#5: ffff8880477b0420 (sb_writers#9){.+.+}-{0:0}, at: ovl_copy_up_flags+0x19b4/0x47c0 fs/overlayfs/copy_up.c:1257
#6: ffff888044774148 (&sb->s_type->i_mutex_key#16){++++}-{4:4}, at: inode_lock include/linux/fs.h:877 [inline]
#6: ffff888044774148 (&sb->s_type->i_mutex_key#16){++++}-{4:4}, at: ovl_copy_up_workdir fs/overlayfs/copy_up.c:782 [inline]
#6: ffff888044774148 (&sb->s_type->i_mutex_key#16){++++}-{4:4}, at: ovl_do_copy_up fs/overlayfs/copy_up.c:1001 [inline]
#6: ffff888044774148 (&sb->s_type->i_mutex_key#16){++++}-{4:4}, at: ovl_copy_up_one fs/overlayfs/copy_up.c:1202 [inline]
#6: ffff888044774148 (&sb->s_type->i_mutex_key#16){++++}-{4:4}, at: ovl_copy_up_flags+0x19cb/0x47c0 fs/overlayfs/copy_up.c:1257
stack backtrace:
CPU: 0 UID: 0 PID: 5305 Comm: syz-executor294 Not tainted 6.14.0-rc1-syzkaller-00181-g7ee983c850b4 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3039
check_deadlock kernel/locking/lockdep.c:3091 [inline]
validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3893
__lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5228
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851
down_write+0x99/0x220 kernel/locking/rwsem.c:1577
inode_lock include/linux/fs.h:877 [inline]
bch2_symlink+0x176/0x310 fs/bcachefs/fs.c:839
vfs_symlink+0x137/0x2e0 fs/namei.c:4671
ovl_do_symlink+0x85/0xd0 fs/overlayfs/overlayfs.h:267
ovl_create_real+0x346/0x550 fs/overlayfs/dir.c:206
ovl_copy_up_workdir fs/overlayfs/copy_up.c:783 [inline]
ovl_do_copy_up fs/overlayfs/copy_up.c:1001 [inline]
ovl_copy_up_one fs/overlayfs/copy_up.c:1202 [inline]
ovl_copy_up_flags+0x19fe/0x47c0 fs/overlayfs/copy_up.c:1257
ovl_rename+0x62a/0x1760 fs/overlayfs/dir.c:1150
vfs_rename+0xbdb/0xf00 fs/namei.c:5069
do_renameat2+0xd94/0x13f0 fs/namei.c:5226
__do_sys_rename fs/namei.c:5273 [inline]
__se_sys_rename fs/namei.c:5271 [inline]
__x64_sys_rename+0x82/0x90 fs/namei.c:5271
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:0x7f0d8dddad19
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 17 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd9dbea2d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007f0d8dddad19
RDX: 00007f0d8dddad19 RSI: 0000400000000840 RDI: 0000400000000800
RBP: 0031656c69662f2e R08: 000055558454d4c0 R09: 000055558454d4c0
R10: 000055558454d4c0 R11: 0000000000000246 R12: 00007ffd9dbea300
R13: 00007ffd9dbea528 R14: 431bde82d7b634db R15: 00007f0d8de2303b
</TASK>
syz-executor294 (5305) used greatest stack depth: 10768 bytes left
---
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.
next prev parent reply other threads:[~2025-02-08 9:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-29 7:31 [syzbot] [bcachefs?] possible deadlock in bch2_symlink syzbot
2025-02-08 9:14 ` syzbot [this message]
2025-08-04 3:02 ` Alan Huang
2025-08-04 3:23 ` Al Viro
2025-08-04 3:27 ` Kent Overstreet
2025-08-18 9:19 ` Amir Goldstein
2025-08-18 10:41 ` syzbot
2025-08-04 23:12 ` Forwarded: syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=67a72070.050a0220.3d72c.0022.GAE@google.com \
--to=syzbot+7836a68852a10ec3d790@syzkaller.appspotmail.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.