syzbot


possible deadlock in filename_create

Status: auto-obsoleted due to no activity on 2024/03/25 04:40
Subsystems: reiserfs
[Documentation on labels]
Reported-by: syzbot+95cb07e3840546a4827b@syzkaller.appspotmail.com
First crash: 583d, last: 152d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] possible deadlock in filename_create 0 (2) 2023/10/10 19:38
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 possible deadlock in filename_create reiserfs 1 487d 487d 0/1 upstream: reported on 2023/02/13 11:59
linux-5.15 possible deadlock in filename_create 23 233d 456d 0/3 auto-obsoleted due to no activity on 2024/02/02 20:22
linux-6.1 possible deadlock in filename_create 15 243d 444d 0/3 auto-obsoleted due to no activity on 2024/01/23 21:11
linux-6.1 possible deadlock in filename_create (2) origin:upstream C 13 10d 104d 0/3 upstream: reported C repro on 2024/03/02 21:45
linux-4.14 possible deadlock in filename_create reiserfs 1 521d 521d 0/1 upstream: reported on 2023/01/10 15:41
linux-5.15 possible deadlock in filename_create (2) origin:upstream C error 10 33d 76d 0/3 upstream: reported C repro on 2024/03/30 13:42
Last patch testing requests (3)
Created Duration User Patch Repo Result
2024/02/22 06:43 28m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2023/12/14 05:22 16m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2023/10/11 12:36 26m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log

Sample crash report:
REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage.
======================================================
WARNING: possible circular locking dependency detected
6.6.0-rc4-syzkaller-g19af4a4ed414 #0 Not tainted
------------------------------------------------------
syz-executor324/6098 is trying to acquire lock:
ffff0000dd376640 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:837 [inline]
ffff0000dd376640 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: filename_create+0x204/0x468 fs/namei.c:3889

but task is already holding lock:
ffff0000d494e410 (sb_writers#8){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:403

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (sb_writers#8){.+.+}-{0:0}:
       percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
       __sb_start_write include/linux/fs.h:1571 [inline]
       sb_start_write+0x60/0x2ec include/linux/fs.h:1646
       mnt_want_write_file+0x64/0x1e8 fs/namespace.c:447
       reiserfs_ioctl+0x188/0x42c fs/reiserfs/ioctl.c:103
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:871 [inline]
       __se_sys_ioctl fs/ioctl.c:857 [inline]
       __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:857
       __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
       invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
       el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
       do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
       el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
       el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
       el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595

-> #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+0x2c/0x38 kernel/locking/mutex.c:799
       reiserfs_write_lock+0x7c/0xe8 fs/reiserfs/lock.c:27
       reiserfs_lookup+0x128/0x45c fs/reiserfs/namei.c:364
       lookup_one_qstr_excl+0x108/0x230 fs/namei.c:1608
       filename_create+0x230/0x468 fs/namei.c:3890
       do_mkdirat+0xac/0x610 fs/namei.c:4135
       __do_sys_mkdirat fs/namei.c:4158 [inline]
       __se_sys_mkdirat fs/namei.c:4156 [inline]
       __arm64_sys_mkdirat+0x90/0xa8 fs/namei.c:4156
       __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
       invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
       el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
       do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
       el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
       el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
       el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595

-> #0 (
&type->i_mutex_dir_key#6/1){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3868 [inline]
       __lock_acquire+0x3370/0x75e8 kernel/locking/lockdep.c:5136
       lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
       down_write_nested+0x58/0xcc kernel/locking/rwsem.c:1689
       inode_lock_nested include/linux/fs.h:837 [inline]
       filename_create+0x204/0x468 fs/namei.c:3889
       do_mkdirat+0xac/0x610 fs/namei.c:4135
       __do_sys_mkdirat fs/namei.c:4158 [inline]
       __se_sys_mkdirat fs/namei.c:4156 [inline]
       __arm64_sys_mkdirat+0x90/0xa8 fs/namei.c:4156
       __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
       invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
       el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
       do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
       el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
       el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
       el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595

other info that might help us debug this:

Chain exists of:
  &type->i_mutex_dir_key#6/1 --> &sbi->lock --> sb_writers#8

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  rlock(sb_writers#8);
                               lock(&sbi->lock);
                               lock(sb_writers#8);
  lock(&type->i_mutex_dir_key#6/1);

 *** DEADLOCK ***

1 lock held by syz-executor324/6098:
 #0: ffff0000d494e410 (sb_writers#8){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:403

stack backtrace:
CPU: 1 PID: 6098 Comm: syz-executor324 Not tainted 6.6.0-rc4-syzkaller-g19af4a4ed414 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
Call trace:
 dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233
 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106
 dump_stack+0x1c/0x28 lib/dump_stack.c:113
 print_circular_bug+0x150/0x1b8 kernel/locking/lockdep.c:2060
 check_noncircular+0x310/0x404 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain kernel/locking/lockdep.c:3868 [inline]
 __lock_acquire+0x3370/0x75e8 kernel/locking/lockdep.c:5136
 lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
 down_write_nested+0x58/0xcc kernel/locking/rwsem.c:1689
 inode_lock_nested include/linux/fs.h:837 [inline]
 filename_create+0x204/0x468 fs/namei.c:3889
 do_mkdirat+0xac/0x610 fs/namei.c:4135
 __do_sys_mkdirat fs/namei.c:4158 [inline]
 __se_sys_mkdirat fs/namei.c:4156 [inline]
 __arm64_sys_mkdirat+0x90/0xa8 fs/namei.c:4156
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595

Crashes (97):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/10/10 19:38 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 19af4a4ed414 83165b57 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/09/29 07:22 upstream 9ed22ae6be81 d265efd8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in filename_create
2023/09/27 07:07 upstream 0e945134b680 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/09/22 10:24 upstream 27bbf45eae9c 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/09/22 09:50 upstream 27bbf45eae9c 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/09/18 21:48 upstream 2cf0f7156238 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/08/26 00:31 upstream 382d4cd18475 03d9c195 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/08/25 07:11 upstream 4f9e7fabf864 49be837e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/08/24 17:14 upstream 93f5de5f648d 49be837e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/08/21 07:08 upstream f7757129e3de d216d8a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/08/20 09:05 upstream 9e6c269de404 d216d8a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/08/04 21:14 upstream e6fda526d9db cdae481e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/08/04 10:19 upstream c1a515d3c027 74621247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/08/03 07:46 upstream ec351c8f2e62 39a91c18 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/08/02 12:12 upstream 5d0c230f1de8 df07ffe8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/08/02 11:02 upstream 5d0c230f1de8 df07ffe8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/07/27 14:09 upstream 0a8db05b571a 92476829 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/07/26 10:55 upstream 18b44bc5a672 2a509c27 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/07/24 02:08 upstream 6eaae1980760 27cbe77f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/07/22 00:30 upstream d192f5382581 27cbe77f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in filename_create
2023/07/20 17:45 upstream 46670259519f f49af159 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/07/16 03:37 upstream 831fe284d827 35d9ecc5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/07/14 12:46 upstream 4b810bf037e5 d624500f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/07/13 10:56 upstream eb26cbb1a754 86081196 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2023/07/11 03:13 upstream 3f01e9fed845 d47e94ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2022/11/09 13:13 upstream f141df371335 5fa28208 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in filename_create
2022/12/03 15:02 upstream 97ee9d1c1696 e080de16 .config console log report info ci-qemu-upstream-386 possible deadlock in filename_create
2022/11/28 14:37 upstream b7b275e60bcd 950c3e02 .config console log report info ci-qemu-upstream-386 possible deadlock in filename_create
2022/11/26 00:38 upstream 0b1dcc2cf55a f4470a7b .config console log report info ci-qemu-upstream-386 possible deadlock in filename_create
2024/01/15 04:39 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 0802e17d9aca 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/11/30 05:12 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2cc14f52aeb7 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/11/22 15:43 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8de1e7afcc1c 03e12510 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/11/21 03:18 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8de1e7afcc1c cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/11/12 07:02 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8de1e7afcc1c 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/11/09 09:38 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8de1e7afcc1c 4862372a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/11/06 14:48 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8de1e7afcc1c 78fae24e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/11/06 00:57 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8de1e7afcc1c 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/10/25 09:16 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 850ffb9bb2bd 17e6d526 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/10/21 07:48 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 78124b0c1d10 361b23dc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/10/18 12:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 78124b0c1d10 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/10/16 17:25 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c295ba49917a 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/10/10 18:00 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 19af4a4ed414 83165b57 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/07/23 00:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e40939bbfc68 27cbe77f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/07/16 22:42 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e40939bbfc68 35d9ecc5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/07/12 15:19 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e40939bbfc68 979d5fe2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/07/10 07:57 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e40939bbfc68 668cb1fa .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/07/02 18:40 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e40939bbfc68 bfc47836 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/07/01 20:22 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e40939bbfc68 bfc47836 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/06/25 22:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e40939bbfc68 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/06/25 04:44 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e40939bbfc68 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/06/14 23:56 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f86b85033b8c 76decb82 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/06/13 21:41 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 4641cff8e810 d2ee9228 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/06/07 10:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci cd6bd67ad7ab 7086cdb9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/05/29 00:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci eb0f1697d729 cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/05/26 13:01 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci eb0f1697d729 b40ef614 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
2023/05/17 04:00 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f1fcbaa18b28 11c89444 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in filename_create
* Struck through repros no longer work on HEAD.