syzbot


possible deadlock in ext4_evict_inode (3)

Status: upstream: reported on 2025/11/26 09:11
Reported-by: syzbot+a3a44cd22b43449e7997@syzkaller.appspotmail.com
First crash: 23d, last: 17d
Similar bugs (12)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in ext4_evict_inode (2) ext4 4 18 1009d 1185d 0/29 auto-obsoleted due to no activity on 2023/07/14 13:24
linux-6.1 possible deadlock in ext4_evict_inode (4) 4 8 8h57m 27d 0/3 upstream: reported on 2025/11/22 18:47
linux-6.1 possible deadlock in ext4_evict_inode (3) 4 1 625d 625d 0/3 auto-obsoleted due to no activity on 2024/07/12 10:45
upstream possible deadlock in ext4_evict_inode (4) ext4 4 3 166d 166d 0/29 auto-obsoleted due to no activity on 2025/10/15 00:50
upstream possible deadlock in ext4_evict_inode (5) ext4 4 66 3h27m 44d 0/29 upstream: reported on 2025/11/05 11:40
linux-5.15 possible deadlock in ext4_evict_inode (2) 4 2 647d 652d 0/3 auto-obsoleted due to no activity on 2024/06/20 13:51
upstream possible deadlock in ext4_evict_inode (3) ext4 4 5 480d 673d 0/29 auto-obsoleted due to no activity on 2024/12/05 07:55
upstream possible deadlock in ext4_evict_inode ext4 4 syz error error 38 2623d 2661d 15/29 fixed on 2020/05/22 17:31
linux-6.1 possible deadlock in ext4_evict_inode 4 2 892d 1002d 0/3 auto-obsoleted due to no activity on 2023/10/19 10:40
linux-6.1 possible deadlock in ext4_evict_inode (2) 4 1 745d 745d 0/3 auto-obsoleted due to no activity on 2024/03/15 02:58
linux-6.6 possible deadlock in ext4_evict_inode 4 6 16d 43d 0/2 upstream: reported on 2025/11/07 03:25
linux-5.15 possible deadlock in ext4_evict_inode 4 2 994d 998d 0/3 auto-obsoleted due to no activity on 2023/07/30 00:10

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.0.166/4769 is trying to acquire lock:
ffff888077cf2650 (sb_internal){.+.+}-{0:0}, at: __sb_start_write include/linux/fs.h:1811 [inline]
ffff888077cf2650 (sb_internal){.+.+}-{0:0}, at: sb_start_intwrite include/linux/fs.h:1928 [inline]
ffff888077cf2650 (sb_internal){.+.+}-{0:0}, at: ext4_evict_inode+0x444/0x1080 fs/ext4/inode.c:243

but task is already holding lock:
ffff888077cf4bd8 (&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 (sb_internal){.+.+}-{0:0}:
       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
       percpu_down_read+0x46/0x1b0 include/linux/percpu-rwsem.h:51
       __sb_start_write include/linux/fs.h:1811 [inline]
       sb_start_intwrite include/linux/fs.h:1928 [inline]
       ext4_evict_inode+0x444/0x1080 fs/ext4/inode.c:243
       evict+0x485/0x870 fs/inode.c:647
       ext4_ext_migrate+0xc0a/0xe50 fs/ext4/migrate.c:588
       __ext4_ioctl fs/ext4/ioctl.c:1028 [inline]
       ext4_ioctl+0x18a5/0x3590 fs/ext4/ioctl.c:1282
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:874 [inline]
       __se_sys_ioctl+0xfa/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(sb_internal);
                               lock(&sbi->s_writepages_rwsem);
  lock(sb_internal);

 *** DEADLOCK ***

3 locks held by syz.0.166/4769:
 #0: ffff888077cf2460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write_file+0x5c/0x200 fs/namespace.c:430
 #1: ffff888063317198 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
 #1: ffff888063317198 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: __ext4_ioctl fs/ext4/ioctl.c:1027 [inline]
 #1: ffff888063317198 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: ext4_ioctl+0x189d/0x3590 fs/ext4/ioctl.c:1282
 #2: ffff888077cf4bd8 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_ext_migrate+0x2c4/0xe50 fs/ext4/migrate.c:438

stack backtrace:
CPU: 0 PID: 4769 Comm: syz.0.166 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
 percpu_down_read+0x46/0x1b0 include/linux/percpu-rwsem.h:51
 __sb_start_write include/linux/fs.h:1811 [inline]
 sb_start_intwrite include/linux/fs.h:1928 [inline]
 ext4_evict_inode+0x444/0x1080 fs/ext4/inode.c:243
 evict+0x485/0x870 fs/inode.c:647
 ext4_ext_migrate+0xc0a/0xe50 fs/ext4/migrate.c:588
 __ext4_ioctl fs/ext4/ioctl.c:1028 [inline]
 ext4_ioctl+0x18a5/0x3590 fs/ext4/ioctl.c:1282
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xfa/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:0x7efd90f41749
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:00007efd8f1a8038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007efd91197fa0 RCX: 00007efd90f41749
RDX: 0000000000000000 RSI: 0000000000006609 RDI: 0000000000000005
RBP: 00007efd90fc5f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007efd91198038 R14: 00007efd91197fa0 R15: 00007fff6388c458
 </TASK>

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/03 05:05 linux-5.15.y cc5ec8769306 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_evict_inode
2025/11/29 04:18 linux-5.15.y cc5ec8769306 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_evict_inode
2025/11/26 10:15 linux-5.15.y cc5ec8769306 64219f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_evict_inode
2025/11/26 09:10 linux-5.15.y cc5ec8769306 64219f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_evict_inode
* Struck through repros no longer work on HEAD.