Hello,
syzbot found the following issue on:
HEAD commit: 68efe5a6c16a Linux 5.15.197
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=1028ca1a580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=7e6ed99963d6ee1d
dashboard link:
https://syzkaller.appspot.com/bug?extid=eed4523656a9db7f6178
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/900f9b9bd850/disk-68efe5a6.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/1e089a5019a6/vmlinux-68efe5a6.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/b319f477b907/bzImage-68efe5a6.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+eed452...@syzkaller.appspotmail.com
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.3.634/7244 is trying to acquire lock:
ffff888074145a80 (&ei->xattr_sem){++++}-{3:3}, at: ext4_xattr_get+0xfc/0x800 fs/ext4/xattr.c:660
but task is already holding lock:
ffff888066ceebd8 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_ext_migrate+0x2c4/0xe50 fs/ext4/migrate.c:438
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+0x46/0x1b0 include/linux/percpu-rwsem.h:51
ext4_writepages+0x1c0/0x2d20 fs/ext4/inode.c:2689
do_writepages+0x48d/0x6d0 mm/page-writeback.c:2386
__writeback_single_inode+0x153/0xda0 fs/fs-writeback.c:1657
writeback_single_inode+0x221/0x8b0 fs/fs-writeback.c:1770
write_inode_now+0x217/0x280 fs/fs-writeback.c:2811
iput_final fs/inode.c:1756 [inline]
iput+0x5ab/0x8a0 fs/inode.c:1795
ext4_xattr_set_entry+0x10ff/0x3d30 fs/ext4/xattr.c:1837
ext4_xattr_block_set+0x4f7/0x2d30 fs/ext4/xattr.c:1936
ext4_xattr_move_to_block fs/ext4/xattr.c:2633 [inline]
ext4_xattr_make_inode_space fs/ext4/xattr.c:2708 [inline]
ext4_expand_extra_isize_ea+0xf4b/0x19a0 fs/ext4/xattr.c:2800
__ext4_expand_extra_isize+0x301/0x3e0 fs/ext4/inode.c:5901
ext4_try_to_expand_extra_isize fs/ext4/inode.c:5944 [inline]
__ext4_mark_inode_dirty+0x469/0x700 fs/ext4/inode.c:6022
ext4_evict_inode+0xa81/0x1080 fs/ext4/inode.c:282
evict+0x485/0x870 fs/inode.c:647
ext4_orphan_cleanup+0xaa9/0x12e0 fs/ext4/orphan.c:470
ext4_fill_super+0x92f0/0x9a60 fs/ext4/super.c:4975
mount_bdev+0x287/0x3c0 fs/super.c:1400
legacy_get_tree+0xe6/0x180 fs/fs_context.c:611
vfs_get_tree+0x88/0x270 fs/super.c:1530
do_new_mount+0x24a/0xa40 fs/namespace.c:3034
do_mount fs/namespace.c:3377 [inline]
__do_sys_mount fs/namespace.c:3585 [inline]
__se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3562
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
-> #0 (&ei->xattr_sem){++++}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3053 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain kernel/locking/lockdep.c:3788 [inline]
__lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012
lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498
ext4_xattr_get+0xfc/0x800 fs/ext4/xattr.c:660
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+0xb0/0x320 fs/ext4/acl.c:283
__ext4_new_inode+0x2e5e/0x39e0 fs/ext4/ialloc.c:1329
ext4_ext_migrate+0x5ef/0xe50 fs/ext4/migrate.c:456
ext4_ioctl_setflags fs/ext4/ioctl.c:455 [inline]
ext4_fileattr_set+0xedd/0x16a0 fs/ext4/ioctl.c:765
vfs_fileattr_set+0x842/0xaf0 fs/ioctl.c:700
ioctl_setflags fs/ioctl.c:732 [inline]
do_vfs_ioctl+0x1767/0x1de0 fs/ioctl.c:843
__do_sys_ioctl fs/ioctl.c:872 [inline]
__se_sys_ioctl+0x83/0x170 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
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.3.634/7244:
#0: ffff888066cec460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write_file+0x5c/0x200 fs/namespace.c:430
#1: ffff888074145da8 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
#1: ffff888074145da8 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: vfs_fileattr_set+0x14c/0xaf0 fs/ioctl.c:685
#2: ffff888066ceebd8 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_ext_migrate+0x2c4/0xe50 fs/ext4/migrate.c:438
stack backtrace:
CPU: 0 PID: 7244 Comm: syz.3.634 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
<TASK>
dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
check_noncircular+0x274/0x310 kernel/locking/lockdep.c:2133
check_prev_add kernel/locking/lockdep.c:3053 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain kernel/locking/lockdep.c:3788 [inline]
__lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012
lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498
ext4_xattr_get+0xfc/0x800 fs/ext4/xattr.c:660
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+0xb0/0x320 fs/ext4/acl.c:283
__ext4_new_inode+0x2e5e/0x39e0 fs/ext4/ialloc.c:1329
ext4_ext_migrate+0x5ef/0xe50 fs/ext4/migrate.c:456
ext4_ioctl_setflags fs/ext4/ioctl.c:455 [inline]
ext4_fileattr_set+0xedd/0x16a0 fs/ext4/ioctl.c:765
vfs_fileattr_set+0x842/0xaf0 fs/ioctl.c:700
ioctl_setflags fs/ioctl.c:732 [inline]
do_vfs_ioctl+0x1767/0x1de0 fs/ioctl.c:843
__do_sys_ioctl fs/ioctl.c:872 [inline]
__se_sys_ioctl+0x83/0x170 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f33ecdfe749
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f33eb044038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f33ed055090 RCX: 00007f33ecdfe749
RDX: 0000200000000080 RSI: 0000000040086602 RDI: 0000000000000006
RBP: 00007f33ece82f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f33ed055128 R14: 00007f33ed055090 R15: 00007ffc4c551b28
</TASK>
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup