syzbot


possible deadlock in path_openat

Status: upstream: reported C repro on 2023/03/17 13:15
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+2c421a1aee9406682e5d@syzkaller.appspotmail.com
First crash: 618d, last: 1d04h
Fix bisection: failed (error log, bisect log)
  
Bug presence (3)
Date Name Commit Repro Result
2024/11/23 linux-5.15.y (ToT) 0a51d2d4527b C [report] possible deadlock in path_openat
2024/10/08 upstream (ToT) 75b607fab38d C [report] possible deadlock in path_openat
2024/11/23 upstream (ToT) 228a1157fb9f C Didn't crash
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in path_openat fs C done unreliable 349 1696d 2251d 0/28 auto-obsoleted due to no activity on 2022/09/16 21:43
android-49 possible deadlock in path_openat 5 1826d 1841d 0/3 auto-closed as invalid on 2020/03/24 08:43
linux-6.1 possible deadlock in path_openat origin:upstream C 162 26d 621d 0/3 upstream: reported C repro on 2023/03/13 16:18
upstream possible deadlock in path_openat (2) reiserfs C error done 305 299d 775d 0/28 auto-obsoleted due to no activity on 2024/06/02 07:09
linux-4.14 possible deadlock in path_openat reiserfs C error 327 633d 2041d 0/1 upstream: reported C repro on 2019/04/24 01:40
linux-4.19 possible deadlock in path_openat C error 859 628d 1989d 0/1 upstream: reported C repro on 2019/06/15 07:08
Last patch testing requests (4)
Created Duration User Patch Repo Result
2024/10/05 10:00 16m retest repro linux-5.15.y report log
2024/10/05 10:00 17m retest repro linux-5.15.y report log
2024/10/05 10:00 11m retest repro linux-5.15.y report log
2024/10/05 10:00 10m retest repro linux-5.15.y report log
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2024/08/27 18:50 14m fix candidate upstream error job log
2024/07/16 02:52 1m fix candidate upstream error job log
2024/05/27 20:10 0m fix candidate upstream error job log
2024/03/22 16:49 0m fix candidate upstream error job log
2024/01/23 20:47 0m fix candidate upstream error job log
2023/12/25 12:17 12m bisect fix linux-5.15.y error job log

Sample crash report:
REISERFS (device loop0): Using tea hash to sort names
=======================================================
WARNING: The mand mount option has been deprecated and
         and is ignored by this kernel. Remove the mand
         option from the mount to silence this warning.
=======================================================
reiserfs: enabling write barrier flush mode
REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage.
======================================================
WARNING: possible circular locking dependency detected
5.15.116-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor903/3503 is trying to acquire lock:
ffff8880756d82e0 (&type->i_mutex_dir_key#6){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
ffff8880756d82e0 (&type->i_mutex_dir_key#6){+.+.}-{3:3}, at: open_last_lookups fs/namei.c:3459 [inline]
ffff8880756d82e0 (&type->i_mutex_dir_key#6){+.+.}-{3:3}, at: path_openat+0x824/0x2f20 fs/namei.c:3669

but task is already holding lock:
ffff888078e5a460 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:377

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (sb_writers#9){.+.+}-{0:0}:
       lock_acquire+0x1db/0x4f0 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+0x4f/0x1c0 include/linux/fs.h:1812
       mnt_want_write_file+0x5a/0x1f0 fs/namespace.c:421
       reiserfs_ioctl+0x170/0x340 fs/reiserfs/ioctl.c:103
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:874 [inline]
       __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x61/0xcb

-> #1 (&sbi->lock){+.+.}-{3:3}:
       lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
       __mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
       reiserfs_write_lock+0x76/0xd0 fs/reiserfs/lock.c:27
       reiserfs_lookup+0x15c/0x4b0 fs/reiserfs/namei.c:364
       __lookup_slow+0x275/0x3d0 fs/namei.c:1659
       lookup_one_len+0x187/0x2d0 fs/namei.c:2688
       reiserfs_lookup_privroot+0x85/0x1e0 fs/reiserfs/xattr.c:980
       reiserfs_fill_super+0x191e/0x2690 fs/reiserfs/super.c:2196
       mount_bdev+0x2c9/0x3f0 fs/super.c:1378
       legacy_get_tree+0xeb/0x180 fs/fs_context.c:610
       vfs_get_tree+0x88/0x270 fs/super.c:1508
       do_new_mount+0x28b/0xae0 fs/namespace.c:2994
       do_mount fs/namespace.c:3337 [inline]
       __do_sys_mount fs/namespace.c:3545 [inline]
       __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3522
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x61/0xcb

-> #0 (&type->i_mutex_dir_key#6){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3053 [inline]
       check_prevs_add kernel/locking/lockdep.c:3172 [inline]
       validate_chain+0x1646/0x58b0 kernel/locking/lockdep.c:3787
       __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5011
       lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
       down_write+0x97/0x170 kernel/locking/rwsem.c:1541
       inode_lock include/linux/fs.h:787 [inline]
       open_last_lookups fs/namei.c:3459 [inline]
       path_openat+0x824/0x2f20 fs/namei.c:3669
       do_filp_open+0x21c/0x460 fs/namei.c:3699
       do_sys_openat2+0x13b/0x500 fs/open.c:1211
       do_sys_open fs/open.c:1227 [inline]
       __do_sys_openat fs/open.c:1243 [inline]
       __se_sys_openat fs/open.c:1238 [inline]
       __x64_sys_openat+0x243/0x290 fs/open.c:1238
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x61/0xcb

other info that might help us debug this:

Chain exists of:
  &type->i_mutex_dir_key#6 --> &sbi->lock --> sb_writers#9

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(sb_writers#9);
                               lock(&sbi->lock);
                               lock(sb_writers#9);
  lock(&type->i_mutex_dir_key#6);

 *** DEADLOCK ***

1 lock held by syz-executor903/3503:
 #0: ffff888078e5a460 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:377

stack backtrace:
CPU: 0 PID: 3503 Comm: syz-executor903 Not tainted 5.15.116-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 check_noncircular+0x2f8/0x3b0 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+0x1646/0x58b0 kernel/locking/lockdep.c:3787
 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5011
 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
 down_write+0x97/0x170 kernel/locking/rwsem.c:1541
 inode_lock include/linux/fs.h:787 [inline]
 open_last_lookups fs/namei.c:3459 [inline]
 path_openat+0x824/0x2f20 fs/namei.c:3669
 do_filp_open+0x21c/0x460 fs/namei.c:3699
 do_sys_openat2+0x13b/0x500 fs/open.c:1211
 do_sys_open fs/open.c:1227 [inline]
 __do_sys_openat fs/open.c:1243 [inline]
 __se_sys_openat fs/open.c:1238 [inline]
 __x64_sys_openat+0x243/0x290 fs/open.c:1238
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f8aa208c909
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 00 00 90 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fffad2dabc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f8aa208c909
RDX: 000000000000275a RSI: 0000000020000280 RDI: 00000000ffffff9c
RBP: 00007f8aa204c1a0 R08: 00000000200000c0 R09: 0000

Crashes (154):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/12 13:06 linux-5.15.y 7349e40704a0 49519f06 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan possible deadlock in path_openat
2024/04/25 14:24 linux-5.15.y c52b9710c83d 8bdc0f22 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/10/17 03:33 linux-5.15.y 02e21884dcf2 342b9c55 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/05/16 13:22 linux-5.15.y b0ece631f84a 71b00cfb .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/05/14 05:38 linux-5.15.y 284087d4f7d5 fdb4c10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in path_openat
2024/05/13 16:02 linux-5.15.y 284087d4f7d5 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in path_openat
2024/05/12 15:39 linux-5.15.y 284087d4f7d5 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in path_openat
2024/05/05 16:39 linux-5.15.y 284087d4f7d5 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in path_openat
2024/05/01 04:55 linux-5.15.y b925f60c6ee7 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in path_openat
2024/04/29 11:09 linux-5.15.y b925f60c6ee7 27e33c58 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in path_openat
2024/04/20 01:19 linux-5.15.y c52b9710c83d af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in path_openat
2023/11/20 19:51 linux-5.15.y 2a910f4af54d cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in path_openat
2023/11/09 15:27 linux-5.15.y 80529b4968a8 56230772 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in path_openat
2023/10/04 17:28 linux-5.15.y b911329317b4 b7d7ff54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in path_openat
2023/10/03 07:34 linux-5.15.y b911329317b4 65faba36 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in path_openat
2023/10/02 18:19 linux-5.15.y b911329317b4 50b20e75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in path_openat
2024/07/09 14:21 linux-5.15.y f45bea23c39c 79d68ada .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/07/09 04:50 linux-5.15.y f45bea23c39c bc23a442 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/07/08 22:02 linux-5.15.y f45bea23c39c cde64f7d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/07/04 08:55 linux-5.15.y 4878aadf2d15 3f2748a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/07/02 15:30 linux-5.15.y 4878aadf2d15 07f0a0a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/06/30 15:27 linux-5.15.y 4878aadf2d15 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/05/15 13:45 linux-5.15.y 284087d4f7d5 94b087b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/05/14 04:06 linux-5.15.y 284087d4f7d5 fdb4c10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/05/14 00:22 linux-5.15.y 284087d4f7d5 fdb4c10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/05/04 05:32 linux-5.15.y 284087d4f7d5 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/04/30 05:34 linux-5.15.y b925f60c6ee7 f10afd69 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/04/27 19:49 linux-5.15.y b925f60c6ee7 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/04/23 12:23 linux-5.15.y c52b9710c83d 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/04/23 02:15 linux-5.15.y c52b9710c83d 36c961ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/04/22 14:18 linux-5.15.y c52b9710c83d 36c961ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/04/21 17:23 linux-5.15.y c52b9710c83d af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/04/21 13:38 linux-5.15.y c52b9710c83d af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/04/04 09:28 linux-5.15.y 9465fef4ae35 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/04/02 22:46 linux-5.15.y 9465fef4ae35 eb2966c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/03/31 00:18 linux-5.15.y 9465fef4ae35 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/03/30 02:02 linux-5.15.y 9465fef4ae35 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/03/30 02:02 linux-5.15.y 9465fef4ae35 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/03/20 15:56 linux-5.15.y b95c01af2113 5b7d42ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/03/18 13:01 linux-5.15.y b95c01af2113 baa80228 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/01/12 21:40 linux-5.15.y 26c690eff0a5 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2024/01/11 23:09 linux-5.15.y 26c690eff0a5 dda5a988 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/11/23 23:38 linux-5.15.y 2a910f4af54d 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/11/13 19:40 linux-5.15.y 80529b4968a8 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/11/09 20:44 linux-5.15.y 80529b4968a8 56230772 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/11/09 09:41 linux-5.15.y 80529b4968a8 4862372a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/11/08 21:37 linux-5.15.y 80529b4968a8 b93f63e8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/10/31 13:24 linux-5.15.y 12952a23a5da 58499c95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/10/27 16:33 linux-5.15.y 12952a23a5da 3c418d72 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/10/27 03:50 linux-5.15.y 12952a23a5da bf285f0c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/10/24 23:56 linux-5.15.y 00c03985402e 17e6d526 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/10/19 13:51 linux-5.15.y 02e21884dcf2 42e1d524 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/10/17 01:54 linux-5.15.y 02e21884dcf2 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/10/13 19:41 linux-5.15.y 02e21884dcf2 f757a323 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/10/13 17:23 linux-5.15.y 02e21884dcf2 f757a323 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/10/11 01:49 linux-5.15.y 02e21884dcf2 83165b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/10/09 16:26 linux-5.15.y 1edcec18cfb7 3c53c7d9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/10/06 14:09 linux-5.15.y 1edcec18cfb7 ea12a918 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
2023/03/17 13:15 linux-5.15.y 8020ae3c051d 18b58603 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in path_openat
* Struck through repros no longer work on HEAD.