syzbot


possible deadlock in open_xa_dir (2)

Status: upstream: reported C repro on 2024/03/31 06:40
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+4fdd0c351c52ec9de6ec@syzkaller.appspotmail.com
First crash: 225d, last: 43m
Bug presence (1)
Date Name Commit Repro Result
2024/03/31 upstream (ToT) 712e14250dd2 C [report] possible deadlock in open_xa_dir
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 possible deadlock in open_xa_dir 4 565d 580d 0/3 auto-obsoleted due to no activity on 2023/08/23 09:03
upstream possible deadlock in open_xa_dir reiserfs C done done 7667 285d 681d 0/28 auto-obsoleted due to no activity on 2024/04/09 20:57
linux-6.1 possible deadlock in open_xa_dir 3 573d 583d 0/3 auto-obsoleted due to no activity on 2023/08/15 19:04
linux-4.19 possible deadlock in open_xa_dir reiserfs C error 3 677d 683d 0/1 upstream: reported C repro on 2022/12/29 15:01
linux-5.15 possible deadlock in open_xa_dir (2) origin:upstream C 293 12h38m 223d 0/3 upstream: reported C repro on 2024/04/02 08:22
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2024/06/09 17:41 1h35m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
REISERFS warning (device loop0): sh-2029: %s: bitmap block (#%u) reading failed reiserfs_read_bitmap_block: reiserfs_read_bitmap_block
======================================================
WARNING: possible circular locking dependency detected
6.1.83-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor772/4226 is trying to acquire lock:
ffff0000df3f8980 (&type->i_mutex_dir_key#6/3){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:793 [inline]
ffff0000df3f8980 (&type->i_mutex_dir_key#6/3){+.+.}-{3:3}, at: open_xa_root fs/reiserfs/xattr.c:127 [inline]
ffff0000df3f8980 (&type->i_mutex_dir_key#6/3){+.+.}-{3:3}, at: open_xa_dir+0x11c/0x578 fs/reiserfs/xattr.c:152

but task is already holding lock:
ffff0000d3272090 (&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/0x578 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_set_acl+0x434/0x5b8 fs/reiserfs/xattr_acl.c:276
       reiserfs_set_acl+0x428/0x60c fs/reiserfs/xattr_acl.c:50
       set_posix_acl fs/posix_acl.c:1160 [inline]
       posix_acl_xattr_set+0x2f8/0x398 fs/posix_acl.c:1189
       __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/0x2c0 arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
       do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
       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/0x578 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+0x260/0x68c fs/inode.c:666
       iput_final fs/inode.c:1791 [inline]
       iput+0x7c0/0x8a4 fs/inode.c:1817
       reiserfs_new_inode+0xc24/0x1724 fs/reiserfs/inode.c:2156
       reiserfs_create+0x33c/0x5a4 fs/reiserfs/namei.c:668
       lookup_open fs/namei.c:3484 [inline]
       open_last_lookups fs/namei.c:3552 [inline]
       path_openat+0xeac/0x2548 fs/namei.c:3782
       do_filp_open+0x1bc/0x3cc fs/namei.c:3812
       do_sys_openat2+0x128/0x3d8 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/0x2c0 arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
       do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
       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-executor772/4226:
 #0: ffff0000d8170460 (sb_writers#8){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:393
 #1: ffff0000df3f82e0 (&type->i_mutex_dir_key#6){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline]
 #1: ffff0000df3f82e0 (&type->i_mutex_dir_key#6){+.+.}-{3:3}, at: open_last_lookups fs/namei.c:3549 [inline]
 #1: ffff0000df3f82e0 (&type->i_mutex_dir_key#6){+.+.}-{3:3}, at: path_openat+0x5ec/0x2548 fs/namei.c:3782
 #2: ffff0000d3272090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock_nested+0x68/0xd8 fs/reiserfs/lock.c:78

stack backtrace:
CPU: 1 PID: 4226 Comm: syz-executor772 Not tainted 6.1.83-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/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/0x5c 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/0x578 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+0x260/0x68c fs/inode.c:666
 iput_final fs/inode.c:1791 [inline]
 iput+0x7c0/0x8a4 fs/inode.c:1817
 reiserfs_new_inode+0xc24/0x1724 fs/reiserfs/inode.c:2156
 reiserfs_create+0x33c/0x5a4 fs/reiserfs/namei.c:668
 lookup_open fs/namei.c:3484 [inline]
 open_last_lookups fs/namei.c:3552 [inline]
 path_openat+0xeac/0x2548 fs/namei.c:3782
 do_filp_open+0x1bc/0x3cc fs/namei.c:3812
 do_sys_openat2+0x128/0x3d8 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/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
 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 (186):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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
2024/11/11 14:24 linux-6.1.y d7039b844a1c 0c4b1325 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2024/11/07 15:15 linux-6.1.y 7c15117f9468 867e44df .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2024/11/04 16:08 linux-6.1.y 7c15117f9468 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2024/10/30 06:40 linux-6.1.y 7ec6f9fa3d97 66aeb999 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2024/10/02 13:09 linux-6.1.y aa4cd140bba5 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2024/10/01 13:04 linux-6.1.y aa4cd140bba5 ea2b66a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2024/09/25 10:09 linux-6.1.y e526b12bf916 349a68c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2024/09/16 18:04 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2024/09/16 16:32 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2024/09/11 21:02 linux-6.1.y 5ca5b389fddf d94c83d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2024/09/11 06:02 linux-6.1.y 5ca5b389fddf 8ab55d0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2024/09/11 00:31 linux-6.1.y 5ca5b389fddf 86aa7bd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2024/08/23 12:57 linux-6.1.y ee5e09825b81 d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in open_xa_dir
2024/11/11 07:25 linux-6.1.y d7039b844a1c 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/11/11 05:52 linux-6.1.y d7039b844a1c 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/11/11 05:49 linux-6.1.y d7039b844a1c 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/11/11 04:41 linux-6.1.y d7039b844a1c 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/11/10 18:57 linux-6.1.y d7039b844a1c 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/11/03 13:23 linux-6.1.y 7c15117f9468 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/11/01 21:15 linux-6.1.y 7c15117f9468 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/30 17:43 linux-6.1.y 7ec6f9fa3d97 fb888278 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/28 10:00 linux-6.1.y 7ec6f9fa3d97 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/27 13:51 linux-6.1.y 7ec6f9fa3d97 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/27 00:05 linux-6.1.y 7ec6f9fa3d97 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/26 06:25 linux-6.1.y 7ec6f9fa3d97 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/25 17:50 linux-6.1.y 7ec6f9fa3d97 045e728d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/25 16:35 linux-6.1.y 7ec6f9fa3d97 045e728d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/24 14:48 linux-6.1.y 7ec6f9fa3d97 0d144d1a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/23 03:50 linux-6.1.y 7ec6f9fa3d97 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/23 02:27 linux-6.1.y 7ec6f9fa3d97 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/22 20:30 linux-6.1.y 7ec6f9fa3d97 a93682b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/22 08:49 linux-6.1.y 54d90d17e8ce a93682b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/22 06:42 linux-6.1.y 54d90d17e8ce a93682b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/21 17:23 linux-6.1.y 54d90d17e8ce f1e4447c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/20 00:39 linux-6.1.y 54d90d17e8ce cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/15 12:12 linux-6.1.y aa4cd140bba5 7eb57b4a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/15 03:43 linux-6.1.y aa4cd140bba5 b01b6661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/12 00:46 linux-6.1.y aa4cd140bba5 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/10 19:41 linux-6.1.y aa4cd140bba5 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/10 17:47 linux-6.1.y aa4cd140bba5 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/10 06:49 linux-6.1.y aa4cd140bba5 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/10 04:26 linux-6.1.y aa4cd140bba5 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/10/03 05:58 linux-6.1.y aa4cd140bba5 a4c7fd36 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/09/23 12:49 linux-6.1.y e526b12bf916 89298aad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in open_xa_dir
2024/09/23 12:47 linux-6.1.y e526b12bf916 89298aad .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.