syzbot


possible deadlock in ext4_xattr_get

Status: upstream: reported on 2025/12/11 02:47
Reported-by: syzbot+528eb129b4dec2d1611e@syzkaller.appspotmail.com
First crash: 82d, last: 2d04h
Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.6 possible deadlock in ext4_xattr_get 4 5 2d03h 108d 0/2 upstream: reported on 2025/11/14 21:22
upstream possible deadlock in ext4_xattr_get (2) ext4 4 7 89d 115d 0/29 upstream: reported on 2025/11/08 13:32
linux-4.14 possible deadlock in ext4_xattr_get 4 C inconclusive 1 1406d 1406d 0/1 upstream: reported C repro on 2022/04/27 03:33
linux-5.15 possible deadlock in ext4_xattr_get 4 13 2d03h 84d 0/3 upstream: reported on 2025/12/09 00:14
upstream possible deadlock in ext4_xattr_get ext4 4 C inconclusive 3 1031d 1304d 22/29 fixed on 2023/07/01 16:05
linux-4.19 possible deadlock in ext4_xattr_get 4 C error 1 1406d 1406d 0/1 upstream: reported C repro on 2022/04/27 05:09

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.2.2853/16842 is trying to acquire lock:
ffff888070769ee0 (&ei->xattr_sem
){++++}-{3:3}, at: ext4_xattr_get+0x107/0x650 fs/ext4/xattr.c:654

but task is already holding lock:
ffff888073f04b98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_ext_migrate+0x2d7/0xe60 fs/ext4/migrate.c:437

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&sbi->s_writepages_rwsem){++++}-{0:0}:
       percpu_down_read+0x44/0x1a0 include/linux/percpu-rwsem.h:51
       ext4_writepages+0x20f/0x2f40 fs/ext4/inode.c:2715
       do_writepages+0x3ba/0x640 mm/page-writeback.c:2491
       __writeback_single_inode+0x156/0x1160 fs/fs-writeback.c:1622
       writeback_single_inode+0x3cb/0x8e0 fs/fs-writeback.c:1743
       write_inode_now+0x17f/0x210 fs/fs-writeback.c:2786
       iput_final fs/inode.c:1821 [inline]
       iput+0x613/0x980 fs/inode.c:1860
       ext4_xattr_block_set+0x273b/0x32b0 fs/ext4/xattr.c:2146
       ext4_xattr_move_to_block fs/ext4/xattr.c:2611 [inline]
       ext4_xattr_make_inode_space fs/ext4/xattr.c:2686 [inline]
       ext4_expand_extra_isize_ea+0x120b/0x1dc0 fs/ext4/xattr.c:2774
       __ext4_expand_extra_isize+0x301/0x3e0 fs/ext4/inode.c:5984
       ext4_try_to_expand_extra_isize fs/ext4/inode.c:6027 [inline]
       __ext4_mark_inode_dirty+0x47f/0x770 fs/ext4/inode.c:6105
       ext4_evict_inode+0xa7f/0x1110 fs/ext4/inode.c:279
       evict+0x4c9/0x8d0 fs/inode.c:705
       ext4_orphan_cleanup+0xbeb/0x1420 fs/ext4/orphan.c:472
       __ext4_fill_super fs/ext4/super.c:5556 [inline]
       ext4_fill_super+0x7829/0x7dc0 fs/ext4/super.c:5687
       get_tree_bdev+0x3f1/0x610 fs/super.c:1366
       vfs_get_tree+0x88/0x270 fs/super.c:1573
       do_new_mount+0x24a/0xa40 fs/namespace.c:3078
       do_mount fs/namespace.c:3421 [inline]
       __do_sys_mount fs/namespace.c:3629 [inline]
       __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3606
       do_syscall_x64 arch/x86/entry/common.c:46 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
       entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #0 (&ei->xattr_sem){++++}-{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+0x2d07/0x7d10 kernel/locking/lockdep.c:5049
       lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5662
       down_read+0x42/0x2d0 kernel/locking/rwsem.c:1520
       ext4_xattr_get+0x107/0x650 fs/ext4/xattr.c:654
       ext4_get_acl+0x80/0x660 fs/ext4/acl.c:165
       get_acl+0x154/0x250 fs/posix_acl.c:153
       posix_acl_create+0x124/0x430 fs/posix_acl.c:632
       ext4_init_acl+0xb7/0x330 fs/ext4/acl.c:283
       __ext4_new_inode+0x2ed4/0x3ad0 fs/ext4/ialloc.c:1327
       ext4_ext_migrate+0x5f1/0xe60 fs/ext4/migrate.c:455
       __ext4_ioctl fs/ext4/ioctl.c:1396 [inline]
       ext4_ioctl+0x1eb1/0x4110 fs/ext4/ioctl.c:1614
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:870 [inline]
       __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856
       do_syscall_x64 arch/x86/entry/common.c:46 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
       entry_SYSCALL_64_after_hwframe+0x68/0xd2

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&sbi->s_writepages_rwsem);
                               lock(&ei->xattr_sem);
                               lock(&sbi->s_writepages_rwsem);
  lock(&ei->xattr_sem);

 *** DEADLOCK ***

3 locks held by syz.2.2853/16842:
 #0: ffff888073f06460 (sb_writers#4){++++}-{0:0}, at: mnt_want_write_file+0x5c/0x200 fs/namespace.c:446
 #1: ffff888070728400 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline]
 #1: ffff888070728400 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: __ext4_ioctl fs/ext4/ioctl.c:1395 [inline]
 #1: ffff888070728400 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: ext4_ioctl+0x1ea9/0x4110 fs/ext4/ioctl.c:1614
 #2: ffff888073f04b98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_ext_migrate+0x2d7/0xe60 fs/ext4/migrate.c:437

stack backtrace:
CPU: 0 PID: 16842 Comm: syz.2.2853 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
 check_noncircular+0x296/0x330 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+0x2d07/0x7d10 kernel/locking/lockdep.c:5049
 lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5662
 down_read+0x42/0x2d0 kernel/locking/rwsem.c:1520
 ext4_xattr_get+0x107/0x650 fs/ext4/xattr.c:654
 ext4_get_acl+0x80/0x660 fs/ext4/acl.c:165
 get_acl+0x154/0x250 fs/posix_acl.c:153
 posix_acl_create+0x124/0x430 fs/posix_acl.c:632
 ext4_init_acl+0xb7/0x330 fs/ext4/acl.c:283
 __ext4_new_inode+0x2ed4/0x3ad0 fs/ext4/ialloc.c:1327
 ext4_ext_migrate+0x5f1/0xe60 fs/ext4/migrate.c:455
 __ext4_ioctl fs/ext4/ioctl.c:1396 [inline]
 ext4_ioctl+0x1eb1/0x4110 fs/ext4/ioctl.c:1614
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f851f39c799
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:00007f85202d3028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f851f616090 RCX: 00007f851f39c799
RDX: 0000000000000000 RSI: 0000000000006609 RDI: 0000000000000005
RBP: 00007f851f432bd9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f851f616128 R14: 00007f851f616090 R15: 00007ffe6c084718
 </TASK>

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/03/01 11:34 linux-6.1.y 779f9571ac3e 43249bac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in ext4_xattr_get
2026/02/27 23:33 linux-6.1.y 779f9571ac3e 2cf092b8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in ext4_xattr_get
2026/03/01 11:12 linux-6.1.y 779f9571ac3e 43249bac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in ext4_xattr_get
2026/03/01 11:08 linux-6.1.y 779f9571ac3e 43249bac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in ext4_xattr_get
2026/02/18 19:04 linux-6.1.y 8ce36b2849ef 77d4d919 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in ext4_xattr_get
2026/02/18 07:09 linux-6.1.y 8ce36b2849ef 39751c21 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in ext4_xattr_get
2026/02/17 06:36 linux-6.1.y 8ce36b2849ef e439b951 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in ext4_xattr_get
2026/02/17 06:36 linux-6.1.y 8ce36b2849ef e439b951 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in ext4_xattr_get
2026/02/17 06:34 linux-6.1.y 8ce36b2849ef e439b951 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in ext4_xattr_get
2026/02/15 00:55 linux-6.1.y 8ce36b2849ef 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in ext4_xattr_get
2026/02/09 04:26 linux-6.1.y 0182cb5b74ee 4c131dc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in ext4_xattr_get
2026/02/07 22:44 linux-6.1.y 0182cb5b74ee 4c131dc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in ext4_xattr_get
2025/12/11 02:46 linux-6.1.y 50cbba13faa2 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in ext4_xattr_get
* Struck through repros no longer work on HEAD.