syzbot


possible deadlock in open_xa_dir (2)

Status: upstream: reported C repro on 2024/03/31 06:40
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+4fdd0c351c52ec9de6ec@syzkaller.appspotmail.com
First crash: 518d, last: 2d03h
Fix commit to backport (bisect log) :
tree: upstream
commit fb6f20ecb121cef4d7946f834a6ee867c4e21b4a
Author: Jan Kara <jack@suse.cz>
Date: Thu Oct 17 10:28:23 2024 +0000

  reiserfs: The last commit

  
Fix bisection: the issue occurs on the latest tested release (bisect log)
Crash: possible deadlock in open_xa_dir (log)
Repro: C syz .config
  
Bug presence (3)
Date Name Commit Repro Result
2025/01/01 linux-6.1.y (ToT) 563edd786f0a C [report] possible deadlock in open_xa_dir
2024/03/31 upstream (ToT) 712e14250dd2 C [report] possible deadlock in open_xa_dir
2025/01/01 upstream (ToT) ccb98ccef0e5 C Didn't crash
Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 possible deadlock in open_xa_dir 4 4 858d 873d 0/3 auto-obsoleted due to no activity on 2023/08/23 09:03
upstream possible deadlock in open_xa_dir fs 4 C done done 7667 578d 974d 0/29 auto-obsoleted due to no activity on 2024/04/09 20:57
linux-6.6 possible deadlock in open_xa_dir 4 16 28d 47d 0/2 upstream: reported on 2025/07/14 22:08
linux-6.1 possible deadlock in open_xa_dir 4 3 866d 876d 0/3 auto-obsoleted due to no activity on 2023/08/15 19:04
linux-4.19 possible deadlock in open_xa_dir reiserfs 4 C error 3 970d 976d 0/1 upstream: reported C repro on 2022/12/29 15:01
linux-5.15 possible deadlock in open_xa_dir (2) missing-backport origin:upstream 4 C error 555 2d03h 516d 0/3 upstream: reported C repro on 2024/04/02 08:22
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2025/02/15 00:19 5h31m fix candidate upstream OK (1) job log
2024/06/09 17:41 1h35m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
REISERFS warning (device loop0): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2)
REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage.
======================================================
WARNING: possible circular locking dependency detected
6.1.129-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor288/4290 is trying to acquire lock:
ffff0000e16f0980 (&type->i_mutex_dir_key#6/3){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:793 [inline]
ffff0000e16f0980 (&type->i_mutex_dir_key#6/3){+.+.}-{3:3}, at: open_xa_root fs/reiserfs/xattr.c:127 [inline]
ffff0000e16f0980 (&type->i_mutex_dir_key#6/3){+.+.}-{3:3}, at: open_xa_dir+0x11c/0x5d0 fs/reiserfs/xattr.c:152

but task is already holding lock:
ffff0000d2a2a090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock_nested+0x68/0xd8 fs/reiserfs/lock.c:78

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&sbi->lock){+.+.}-{3:3}:
       __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:603
       __mutex_lock kernel/locking/mutex.c:747 [inline]
       mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
       reiserfs_write_lock+0x7c/0xe8 fs/reiserfs/lock.c:27
       reiserfs_mkdir+0x280/0x77c fs/reiserfs/namei.c:831
       xattr_mkdir fs/reiserfs/xattr.c:76 [inline]
       open_xa_root fs/reiserfs/xattr.c:136 [inline]
       open_xa_dir+0x288/0x5d0 fs/reiserfs/xattr.c:152
       xattr_lookup+0x3c/0x268 fs/reiserfs/xattr.c:395
       reiserfs_xattr_set_handle+0xe4/0xe90 fs/reiserfs/xattr.c:533
       reiserfs_xattr_set+0x398/0x4b0 fs/reiserfs/xattr.c:633
       trusted_set+0x98/0xec fs/reiserfs/xattr_trusted.c:31
       __vfs_setxattr+0x388/0x3a4 fs/xattr.c:182
       __vfs_setxattr_noperm+0x110/0x528 fs/xattr.c:216
       __vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:277
       vfs_setxattr+0x1a8/0x344 fs/xattr.c:309
       do_setxattr fs/xattr.c:594 [inline]
       setxattr+0x230/0x294 fs/xattr.c:617
       __do_sys_fsetxattr fs/xattr.c:673 [inline]
       __se_sys_fsetxattr fs/xattr.c:662 [inline]
       __arm64_sys_fsetxattr+0x1a8/0x224 fs/xattr.c:662
       __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
       invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
       do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
       el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
       el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
       el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

-> #0 (&type->i_mutex_dir_key#6/3){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3090 [inline]
       check_prevs_add kernel/locking/lockdep.c:3209 [inline]
       validate_chain kernel/locking/lockdep.c:3825 [inline]
       __lock_acquire+0x3338/0x7680 kernel/locking/lockdep.c:5049
       lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5662
       down_write_nested+0x64/0x94 kernel/locking/rwsem.c:1689
       inode_lock_nested include/linux/fs.h:793 [inline]
       open_xa_root fs/reiserfs/xattr.c:127 [inline]
       open_xa_dir+0x11c/0x5d0 fs/reiserfs/xattr.c:152
       reiserfs_for_each_xattr+0x16c/0x8d8 fs/reiserfs/xattr.c:252
       reiserfs_delete_xattrs+0x2c/0xa4 fs/reiserfs/xattr.c:364
       reiserfs_evict_inode+0x1dc/0x3f0 fs/reiserfs/inode.c:53
       evict+0x418/0x894 fs/inode.c:705
       iput_final fs/inode.c:1834 [inline]
       iput+0x7c0/0x8a4 fs/inode.c:1860
       reiserfs_create+0x2d0/0x5a4
       lookup_open fs/namei.c:3482 [inline]
       open_last_lookups fs/namei.c:3550 [inline]
       path_openat+0xeac/0x2548 fs/namei.c:3780
       do_filp_open+0x1bc/0x3cc fs/namei.c:3810
       do_sys_openat2+0x128/0x3e0 fs/open.c:1318
       do_sys_open fs/open.c:1334 [inline]
       __do_sys_openat fs/open.c:1350 [inline]
       __se_sys_openat fs/open.c:1345 [inline]
       __arm64_sys_openat+0x1f0/0x240 fs/open.c:1345
       __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
       invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
       do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
       el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
       el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
       el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&sbi->lock);
                               lock(&type->i_mutex_dir_key#6/3);
                               lock(&sbi->lock);
  lock(&type->i_mutex_dir_key#6/3);

 *** DEADLOCK ***

3 locks held by syz-executor288/4290:
 #0: ffff0000d97f2460 (sb_writers#8){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:393
 #1: ffff0000e16f02e0 (&type->i_mutex_dir_key#6){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline]
 #1: ffff0000e16f02e0 (&type->i_mutex_dir_key#6){+.+.}-{3:3}, at: open_last_lookups fs/namei.c:3547 [inline]
 #1: ffff0000e16f02e0 (&type->i_mutex_dir_key#6){+.+.}-{3:3}, at: path_openat+0x5ec/0x2548 fs/namei.c:3780
 #2: ffff0000d2a2a090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock_nested+0x68/0xd8 fs/reiserfs/lock.c:78

stack backtrace:
CPU: 0 PID: 4290 Comm: syz-executor288 Not tainted 6.1.129-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 dump_stack+0x1c/0x58 lib/dump_stack.c:113
 print_circular_bug+0x150/0x1b8 kernel/locking/lockdep.c:2048
 check_noncircular+0x2cc/0x378 kernel/locking/lockdep.c:2170
 check_prev_add kernel/locking/lockdep.c:3090 [inline]
 check_prevs_add kernel/locking/lockdep.c:3209 [inline]
 validate_chain kernel/locking/lockdep.c:3825 [inline]
 __lock_acquire+0x3338/0x7680 kernel/locking/lockdep.c:5049
 lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5662
 down_write_nested+0x64/0x94 kernel/locking/rwsem.c:1689
 inode_lock_nested include/linux/fs.h:793 [inline]
 open_xa_root fs/reiserfs/xattr.c:127 [inline]
 open_xa_dir+0x11c/0x5d0 fs/reiserfs/xattr.c:152
 reiserfs_for_each_xattr+0x16c/0x8d8 fs/reiserfs/xattr.c:252
 reiserfs_delete_xattrs+0x2c/0xa4 fs/reiserfs/xattr.c:364
 reiserfs_evict_inode+0x1dc/0x3f0 fs/reiserfs/inode.c:53
 evict+0x418/0x894 fs/inode.c:705
 iput_final fs/inode.c:1834 [inline]
 iput+0x7c0/0x8a4 fs/inode.c:1860
 reiserfs_create+0x2d0/0x5a4
 lookup_open fs/namei.c:3482 [inline]
 open_last_lookups fs/namei.c:3550 [inline]
 path_openat+0xeac/0x2548 fs/namei.c:3780
 do_filp_open+0x1bc/0x3cc fs/namei.c:3810
 do_sys_openat2+0x128/0x3e0 fs/open.c:1318
 do_sys_open fs/open.c:1334 [inline]
 __do_sys_openat fs/open.c:1350 [inline]
 __se_sys_openat fs/open.c:1345 [inline]
 __arm64_sys_openat+0x1f0/0x240 fs/open.c:1345
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

Crashes (418):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/22 12:40 linux-6.1.y 3a8358583626 d34966d1 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/03/31 07:14 linux-6.1.y e5cd595e23c1 6baf5069 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/08/29 12:42 linux-6.1.y f89b6e15694c 3e1beec6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/08/29 10:12 linux-6.1.y f89b6e15694c 3e1beec6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/08/29 00:13 linux-6.1.y f89b6e15694c d401b9d7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/08/28 20:49 linux-6.1.y f89b6e15694c d401b9d7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/08/28 15:31 linux-6.1.y f89b6e15694c e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/08/26 16:30 linux-6.1.y 0bc96de781b4 e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/08/04 22:16 linux-6.1.y 3594f306da12 f5bcc8dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/08/02 02:55 linux-6.1.y 3594f306da12 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/08/01 14:25 linux-6.1.y 3594f306da12 40127d41 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/07/23 09:05 linux-6.1.y 3369c6df2fae e1dd4f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/07/22 17:58 linux-6.1.y 3369c6df2fae 8e9d1dc1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/07/15 08:10 linux-6.1.y f2198ea7eb3e 03fcfc4b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/07/14 22:00 linux-6.1.y f2198ea7eb3e d8fc7335 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/05/09 18:30 linux-6.1.y 02b72ccb5f9d 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/03/08 00:05 linux-6.1.y 6ae7ac5c4251 7e3bd60d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/03/05 18:16 linux-6.1.y 3a8358583626 60f5d8d9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/03/05 18:15 linux-6.1.y 3a8358583626 60f5d8d9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2025/08/25 13:47 linux-6.1.y 0bc96de781b4 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/08/23 20:53 linux-6.1.y 0bc96de781b4 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/08/11 11:17 linux-6.1.y 3594f306da12 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/08/09 20:34 linux-6.1.y 3594f306da12 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/08/09 16:56 linux-6.1.y 3594f306da12 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/08/06 20:53 linux-6.1.y 3594f306da12 ffe1dd46 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/08/04 05:21 linux-6.1.y 3594f306da12 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/07/20 12:59 linux-6.1.y 3369c6df2fae 7117feec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/07/19 19:33 linux-6.1.y 3369c6df2fae 7117feec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/06/09 07:06 linux-6.1.y 58485ff1a74f 4826c28e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/06/06 09:01 linux-6.1.y 58485ff1a74f 6b6b5f21 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/06/03 16:30 linux-6.1.y da3c5173c55f a30356b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/06/02 01:45 linux-6.1.y da3c5173c55f 3d2f584d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/05/31 11:21 linux-6.1.y da3c5173c55f 3d2f584d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/04/01 18:45 linux-6.1.y 8e60a714ba3b b8645499 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/04/01 08:52 linux-6.1.y 8e60a714ba3b 36d76a97 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/03/26 06:22 linux-6.1.y 344a09659766 89d30d73 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/03/20 23:48 linux-6.1.y 344a09659766 62330552 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/03/19 07:41 linux-6.1.y 344a09659766 8d0a2921 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/03/13 18:14 linux-6.1.y 344a09659766 44be8b44 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/03/13 12:25 linux-6.1.y 6ae7ac5c4251 44be8b44 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/03/11 21:33 linux-6.1.y 6ae7ac5c4251 16256247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/03/10 19:02 linux-6.1.y 6ae7ac5c4251 16256247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/03/10 00:15 linux-6.1.y 6ae7ac5c4251 163f510d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/03/07 21:41 linux-6.1.y 6ae7ac5c4251 7e3bd60d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/03/06 22:29 linux-6.1.y 3a8358583626 831e3629 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/02/26 17:14 linux-6.1.y 3a8358583626 d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/02/22 09:51 linux-6.1.y 3a8358583626 d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/02/09 05:10 linux-6.1.y 0cbb5f65e52f ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2025/02/08 20:24 linux-6.1.y 0cbb5f65e52f ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/03/31 06:39 linux-6.1.y e5cd595e23c1 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
* Struck through repros no longer work on HEAD.