syzbot


possible deadlock in ext4_multi_mount_protect

Status: auto-obsoleted due to no activity on 2024/10/04 00:46
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+0c1724b48161889e177f@syzkaller.appspotmail.com
First crash: 557d, last: 507d
Fix bisection: failed (error log, bisect log)
  
Bug presence (2)
Date Name Commit Repro Result
2023/05/17 linux-5.15.y (ToT) 9d6bde853685 C [report] possible deadlock in ext4_multi_mount_protect
2023/05/17 upstream (ToT) f1fcbaa18b28 C Didn't crash
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in ext4_multi_mount_protect ext4 C 584 469d 554d 22/28 fixed on 2023/07/01 16:05
linux-6.1 possible deadlock in ext4_multi_mount_protect origin:upstream C done 165 514d 557d 3/3 fixed on 2023/06/19 12:27
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/10/04 00:28 17m retest repro linux-5.15.y OK log
Fix bisection attempts (8)
Created Duration User Patch Repo Result
2024/04/26 03:36 0m fix candidate upstream error job log
2024/03/26 01:42 0m fix candidate upstream error job log
2024/02/12 11:20 1m fix candidate upstream error job log
2024/01/08 23:40 21m fix candidate upstream error job log
2023/12/09 23:09 0m fix candidate upstream error job log
2023/10/31 05:10 0m fix candidate upstream error job log
2023/09/21 23:32 0m fix candidate upstream error job log
2023/06/26 15:43 1m bisect fix linux-5.15.y error job log

Sample crash report:
EXT4-fs (loop0): 1 truncate cleaned up
EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue. Quota mode: writeback.
======================================================
WARNING: possible circular locking dependency detected
5.15.111-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor920/3961 is trying to acquire lock:
ffff0000d3d8c460 (sb_writers#3){.+.+}-{0:0}, at: ext4_multi_mount_protect+0x2e0/0x894 fs/ext4/mmp.c:351

but task is already holding lock:
ffff0000d3d8c0e0 (&type->s_umount_key#30){++++}-{3:3}, at: vfs_fsconfig_locked fs/fsopen.c:253 [inline]
ffff0000d3d8c0e0 (&type->s_umount_key#30){++++}-{3:3}, at: __do_sys_fsconfig fs/fsopen.c:439 [inline]
ffff0000d3d8c0e0 (&type->s_umount_key#30){++++}-{3:3}, at: __se_sys_fsconfig fs/fsopen.c:314 [inline]
ffff0000d3d8c0e0 (&type->s_umount_key#30){++++}-{3:3}, at: __arm64_sys_fsconfig+0xa14/0xd18 fs/fsopen.c:314

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&type->s_umount_key#30){++++}-{3:3}:
       down_write+0x110/0x260 kernel/locking/rwsem.c:1541
       __do_sys_quotactl_fd fs/quota/quota.c:996 [inline]
       __se_sys_quotactl_fd fs/quota/quota.c:971 [inline]
       __arm64_sys_quotactl_fd+0x2fc/0x4a4 fs/quota/quota.c:971
       __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
       invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
       do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
       el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
       el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
       el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

-> #0 (sb_writers#3){.+.+}-{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:3787 [inline]
       __lock_acquire+0x32cc/0x7620 kernel/locking/lockdep.c:5011
       lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5622
       percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
       __sb_start_write include/linux/fs.h:1742 [inline]
       sb_start_write include/linux/fs.h:1812 [inline]
       write_mmp_block+0x170/0xd18 fs/ext4/mmp.c:50
       ext4_multi_mount_protect+0x2e0/0x894 fs/ext4/mmp.c:351
       ext4_remount+0x1fc8/0x2710 fs/ext4/super.c:5951
       legacy_reconfigure+0xfc/0x114 fs/fs_context.c:633
       reconfigure_super+0x340/0x690 fs/super.c:916
       vfs_fsconfig_locked fs/fsopen.c:254 [inline]
       __do_sys_fsconfig fs/fsopen.c:439 [inline]
       __se_sys_fsconfig fs/fsopen.c:314 [inline]
       __arm64_sys_fsconfig+0xa1c/0xd18 fs/fsopen.c:314
       __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
       invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
       do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
       el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
       el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
       el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&type->s_umount_key#30);
                               lock(sb_writers#3);
                               lock(&type->s_umount_key#30);
  lock(sb_writers#3);

 *** DEADLOCK ***

2 locks held by syz-executor920/3961:
 #0: ffff0000ccd96870 (&fc->uapi_mutex){+.+.}-{3:3}, at: __do_sys_fsconfig fs/fsopen.c:437 [inline]
 #0: ffff0000ccd96870 (&fc->uapi_mutex){+.+.}-{3:3}, at: __se_sys_fsconfig fs/fsopen.c:314 [inline]
 #0: ffff0000ccd96870 (&fc->uapi_mutex){+.+.}-{3:3}, at: __arm64_sys_fsconfig+0x720/0xd18 fs/fsopen.c:314
 #1: ffff0000d3d8c0e0 (&type->s_umount_key#30){++++}-{3:3}, at: vfs_fsconfig_locked fs/fsopen.c:253 [inline]
 #1: ffff0000d3d8c0e0 (&type->s_umount_key#30){++++}-{3:3}, at: __do_sys_fsconfig fs/fsopen.c:439 [inline]
 #1: ffff0000d3d8c0e0 (&type->s_umount_key#30){++++}-{3:3}, at: __se_sys_fsconfig fs/fsopen.c:314 [inline]
 #1: ffff0000d3d8c0e0 (&type->s_umount_key#30){++++}-{3:3}, at: __arm64_sys_fsconfig+0xa14/0xd18 fs/fsopen.c:314

stack backtrace:
CPU: 1 PID: 3961 Comm: syz-executor920 Not tainted 5.15.111-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
Call trace:
 dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
 __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:2011
 check_noncircular+0x2cc/0x378 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:3787 [inline]
 __lock_acquire+0x32cc/0x7620 kernel/locking/lockdep.c:5011
 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5622
 percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
 __sb_start_write include/linux/fs.h:1742 [inline]
 sb_start_write include/linux/fs.h:1812 [inline]
 write_mmp_block+0x170/0xd18 fs/ext4/mmp.c:50
 ext4_multi_mount_protect+0x2e0/0x894 fs/ext4/mmp.c:351
 ext4_remount+0x1fc8/0x2710 fs/ext4/super.c:5951
 legacy_reconfigure+0xfc/0x114 fs/fs_context.c:633
 reconfigure_super+0x340/0x690 fs/super.c:916
 vfs_fsconfig_locked fs/fsopen.c:254 [inline]
 __do_sys_fsconfig fs/fsopen.c:439 [inline]
 __se_sys_fsconfig fs/fsopen.c:314 [inline]
 __arm64_sys_fsconfig+0xa1c/0xd18 fs/fsopen.c:314
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
EXT4-fs warning (device loop0): ext4_enable_quotas:6397: Failed to enable quota tracking (type=2, err=-22, ino=15). Please run e2fsck to fix.

Crashes (171):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/14 11:32 linux-5.15.y b0ece631f84a 2b9ba477 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/24 16:17 linux-5.15.y 9d6bde853685 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/24 13:58 linux-5.15.y 9d6bde853685 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/20 03:17 linux-5.15.y 9d6bde853685 96689200 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/18 09:17 linux-5.15.y 9d6bde853685 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/18 04:27 linux-5.15.y 9d6bde853685 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/18 01:20 linux-5.15.y 9d6bde853685 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/17 19:00 linux-5.15.y 9d6bde853685 eaac4681 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/16 13:17 linux-5.15.y b0ece631f84a 71b00cfb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/16 10:44 linux-5.15.y b0ece631f84a 71b00cfb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/15 20:41 linux-5.15.y b0ece631f84a c4d362e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/13 00:21 linux-5.15.y b0ece631f84a ecca8a24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/12 19:57 linux-5.15.y b0ece631f84a ecca8a24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/12 15:02 linux-5.15.y b0ece631f84a ecca8a24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/12 07:56 linux-5.15.y b0ece631f84a adb9a3cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/12 07:09 linux-5.15.y b0ece631f84a adb9a3cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/11 12:49 linux-5.15.y 8a7f2a5c5aa1 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/10 19:16 linux-5.15.y 8a7f2a5c5aa1 14b12a99 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/10 15:13 linux-5.15.y 8a7f2a5c5aa1 14b12a99 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/10 01:05 linux-5.15.y 8a7f2a5c5aa1 30aa2a7e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/08 09:41 linux-5.15.y 8a7f2a5c5aa1 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/05 23:29 linux-5.15.y 8a7f2a5c5aa1 de870ca5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/05 17:54 linux-5.15.y 8a7f2a5c5aa1 de870ca5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ext4_multi_mount_protect
2023/05/19 11:55 linux-5.15.y 9d6bde853685 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/18 03:06 linux-5.15.y 9d6bde853685 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/17 23:03 linux-5.15.y 9d6bde853685 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/17 21:24 linux-5.15.y 9d6bde853685 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/16 23:03 linux-5.15.y b0ece631f84a 11c89444 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/16 07:35 linux-5.15.y b0ece631f84a 71b00cfb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/15 17:54 linux-5.15.y b0ece631f84a c4d362e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/15 16:29 linux-5.15.y b0ece631f84a c4d362e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/13 10:19 linux-5.15.y b0ece631f84a 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/11 18:50 linux-5.15.y b0ece631f84a 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/11 07:04 linux-5.15.y 8a7f2a5c5aa1 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/10 17:33 linux-5.15.y 8a7f2a5c5aa1 14b12a99 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/10 12:23 linux-5.15.y 8a7f2a5c5aa1 14b12a99 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/10 07:05 linux-5.15.y 8a7f2a5c5aa1 1964022b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/09 15:34 linux-5.15.y 8a7f2a5c5aa1 30aa2a7e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/08 19:46 linux-5.15.y 8a7f2a5c5aa1 c7a5e2a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/06 00:31 linux-5.15.y 8a7f2a5c5aa1 de870ca5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/05 22:27 linux-5.15.y 8a7f2a5c5aa1 de870ca5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/05 16:16 linux-5.15.y 8a7f2a5c5aa1 de870ca5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/04 14:27 linux-5.15.y 8a7f2a5c5aa1 518a39a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/05/04 05:09 linux-5.15.y 8a7f2a5c5aa1 5b7ff9dd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
2023/04/05 01:35 linux-5.15.y c957cbb87315 831373d3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in ext4_multi_mount_protect
* Struck through repros no longer work on HEAD.