syzbot


possible deadlock in path_openat

Status: upstream: reported C repro on 2026/04/04 09:21
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+c824a123448a344d4722@syzkaller.appspotmail.com
First crash: 2d17h, last: 2d06h
Bug presence (2)
Date Name Commit Repro Result
2026/04/04 linux-6.6.y (ToT) 08667c1437c0 C [report] possible deadlock in path_openat
2026/04/04 upstream (ToT) 3aae9383f42f C Didn't crash
Similar bugs (9)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in path_openat fs 4 C done unreliable 349 2195d 2750d 0/29 auto-obsoleted due to no activity on 2022/09/16 21:43
upstream possible deadlock in path_openat (3) fs 4 1 218d 218d 29/29 fixed on 2025/10/29 21:02
android-49 possible deadlock in path_openat 4 5 2324d 2340d 0/3 auto-closed as invalid on 2020/03/24 08:43
linux-6.1 possible deadlock in path_openat origin:upstream missing-backport 4 C done 195 58d 1120d 0/3 upstream: reported C repro on 2023/03/13 16:18
upstream possible deadlock in path_openat (2) fs 4 C error done 305 798d 1273d 0/29 auto-obsoleted due to no activity on 2024/06/02 07:09
linux-4.14 possible deadlock in path_openat reiserfs 4 C error 327 1131d 2540d 0/1 upstream: reported C repro on 2019/04/24 01:40
linux-5.15 possible deadlock in path_openat missing-backport origin:upstream 4 C done 181 10d 1116d 0/3 upstream: reported C repro on 2023/03/17 13:15
upstream possible deadlock in path_openat (4) fs 4 1 111d 98d 0/29 auto-obsoleted due to no activity on 2026/03/26 17:57
linux-4.19 possible deadlock in path_openat 4 C error 859 1127d 2487d 0/1 upstream: reported C repro on 2019/06/15 07:08
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2026/04/06 00:55 1m fix candidate upstream error job log

Sample crash report:
REISERFS warning: green-16003 errcatch_is_left_mergeable: Invalid item type observed, run fsck ASAP
REISERFS warning: green-16003 errcatch_is_left_mergeable: Invalid item type observed, run fsck ASAP
REISERFS warning: green-16003 errcatch_is_left_mergeable: Invalid item type observed, run fsck ASAP
REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage.
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.0.17/5924 is trying to acquire lock:
ffff88805ed682f0 (&type->i_mutex_dir_key#8){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:804 [inline]
ffff88805ed682f0 (&type->i_mutex_dir_key#8){+.+.}-{3:3}, at: open_last_lookups fs/namei.c:3561 [inline]
ffff88805ed682f0 (&type->i_mutex_dir_key#8){+.+.}-{3:3}, at: path_openat+0x7dc/0x3230 fs/namei.c:3794

but task is already holding lock:
ffff88802d020418 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:412

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (sb_writers#13){.+.+}-{0:0}:
       percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
       __sb_start_write include/linux/fs.h:1633 [inline]
       sb_start_write+0x4d/0x1c0 include/linux/fs.h:1708
       mnt_want_write_file+0x63/0x200 fs/namespace.c:456
       reiserfs_ioctl+0x112/0x2d0 fs/reiserfs/ioctl.c:103
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:871 [inline]
       __se_sys_ioctl+0xfd/0x170 fs/ioctl.c:857
       do_syscall_x64 arch/x86/entry/common.c:46 [inline]
       do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
       entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #1 (&sbi->lock){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x136/0xcc0 kernel/locking/mutex.c:747
       reiserfs_write_lock+0x79/0xd0 fs/reiserfs/lock.c:27
       reiserfs_lookup+0x183/0x580 fs/reiserfs/namei.c:364
       __lookup_slow+0x2a1/0x400 fs/namei.c:1702
       lookup_one_len+0x1a1/0x2e0 fs/namei.c:2752
       reiserfs_lookup_privroot+0x89/0x180 fs/reiserfs/xattr.c:977
       reiserfs_fill_super+0x1fb2/0x23b0 fs/reiserfs/super.c:2174
       mount_bdev+0x221/0x2d0 fs/super.c:1643
       legacy_get_tree+0xea/0x180 fs/fs_context.c:662
       vfs_get_tree+0x8c/0x280 fs/super.c:1764
       do_new_mount+0x24b/0xa40 fs/namespace.c:3386
       do_mount fs/namespace.c:3726 [inline]
       __do_sys_mount fs/namespace.c:3935 [inline]
       __se_sys_mount+0x2e7/0x3d0 fs/namespace.c:3912
       do_syscall_x64 arch/x86/entry/common.c:46 [inline]
       do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
       entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #0 (&type->i_mutex_dir_key#8){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3869 [inline]
       __lock_acquire+0x2df1/0x7d40 kernel/locking/lockdep.c:5137
       lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754
       down_write+0x97/0x200 kernel/locking/rwsem.c:1573
       inode_lock include/linux/fs.h:804 [inline]
       open_last_lookups fs/namei.c:3561 [inline]
       path_openat+0x7dc/0x3230 fs/namei.c:3794
       do_filp_open+0x1f5/0x430 fs/namei.c:3824
       do_sys_openat2+0x134/0x1d0 fs/open.c:1421
       do_sys_open fs/open.c:1436 [inline]
       __do_sys_openat fs/open.c:1452 [inline]
       __se_sys_openat fs/open.c:1447 [inline]
       __x64_sys_openat+0x139/0x160 fs/open.c:1447
       do_syscall_x64 arch/x86/entry/common.c:46 [inline]
       do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
       entry_SYSCALL_64_after_hwframe+0x68/0xd2

other info that might help us debug this:

Chain exists of:
  &type->i_mutex_dir_key#8 --> &sbi->lock --> sb_writers#13

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  rlock(sb_writers#13);
                               lock(&sbi->lock);
                               lock(sb_writers#13);
  lock(&type->i_mutex_dir_key#8);

 *** DEADLOCK ***

1 lock held by syz.0.17/5924:
 #0: ffff88802d020418 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:412

stack backtrace:
CPU: 0 PID: 5924 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
 check_noncircular+0x2fc/0x400 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain kernel/locking/lockdep.c:3869 [inline]
 __lock_acquire+0x2df1/0x7d40 kernel/locking/lockdep.c:5137
 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754
 down_write+0x97/0x200 kernel/locking/rwsem.c:1573
 inode_lock include/linux/fs.h:804 [inline]
 open_last_lookups fs/namei.c:3561 [inline]
 path_openat+0x7dc/0x3230 fs/namei.c:3794
 do_filp_open+0x1f5/0x430 fs/namei.c:3824
 do_sys_openat2+0x134/0x1d0 fs/open.c:1421
 do_sys_open fs/open.c:1436 [inline]
 __do_sys_openat fs/open.c:1452 [inline]
 __se_sys_openat fs/open.c:1447 [inline]
 __x64_sys_openat+0x139/0x160 fs/open.c:1447
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f1386d9c819
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc88c2be68 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f1387015fa0 RCX: 00007f1386d9c819
RDX: 000000000000275a RSI: 0000200000000080 RDI: ffffffffffffff9c
RBP: 00007f1386e32c91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1387015fac R14: 00007f1387015fa0 R15: 00007f1387015fa0
 </TASK>
REISERFS warning: green-16003 errcatch_is_left_mergeable: Invalid item type observed, run fsck ASAP
REISERFS warning: green-16003 errcatch_is_left_mergeable: Invalid item type observed, run fsck ASAP

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/04/04 09:21 linux-6.6.y c09fbcd31ae6 4440e7c2 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan possible deadlock in path_openat
* Struck through repros no longer work on HEAD.