syzbot


possible deadlock in mnt_want_write

Status: auto-closed as invalid on 2019/02/22 14:57
First crash: 2120d, last: 2120d
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 possible deadlock in mnt_want_write origin:upstream missing-backport C done 117 184d 436d 0/3 upstream: reported C repro on 2023/03/21 10:01
upstream possible deadlock in mnt_want_write fs C done done 662 1330d 2138d 15/26 fixed on 2020/11/16 12:12
linux-6.1 possible deadlock in mnt_want_write origin:upstream missing-backport C done 56 185d 429d 0/3 upstream: reported C repro on 2023/03/28 13:05
linux-4.19 possible deadlock in mnt_want_write romfs C 730 450d 1868d 0/1 upstream: reported C repro on 2019/04/19 16:54
upstream possible deadlock in mnt_want_write (2) integrity overlayfs C done 867 211d 1080d 25/26 fixed on 2023/12/21 01:43
upstream possible deadlock in mnt_want_write (3) kernfs 9 47d 150d 0/26 upstream: reported on 2024/01/01 07:31
linux-4.14 possible deadlock in mnt_want_write ubifs C 10467 450d 1862d 0/1 upstream: reported C repro on 2019/04/25 05:09

Sample crash report:
======================================================
[ INFO: possible circular locking dependency detected ]
4.9.119-g92e8704 #22 Not tainted
-------------------------------------------------------
syz-executor5/15249 is trying to acquire lock:
 (sb_writers#19){.+.+.+}, at: [<ffffffff815e0e3f>] sb_start_write include/linux/fs.h:1573 [inline]
 (sb_writers#19){.+.+.+}, at: [<ffffffff815e0e3f>] mnt_want_write+0x3f/0xb0 fs/namespace.c:391
but task is already holding lock:
 (&fi->mutex){+.+.+.}, at: [<ffffffff81938832>] fuse_lock_inode+0xa2/0xd0 fs/fuse/inode.c:362
which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

       __lock_release kernel/locking/lockdep.c:3571 [inline]
       lock_release+0x442/0xb80 kernel/locking/lockdep.c:3775
       up_write+0x1a/0x60 kernel/locking/rwsem.c:113
       inode_unlock include/linux/fs.h:771 [inline]
       do_last fs/namei.c:3317 [inline]
       path_openat+0xf23/0x3590 fs/namei.c:3534
       do_filp_open+0x197/0x270 fs/namei.c:3568
       do_sys_open+0x30d/0x5c0 fs/open.c:1072
       SYSC_open fs/open.c:1090 [inline]
       SyS_open fs/open.c:1085 [inline]
       SYSC_creat fs/open.c:1110 [inline]
       SyS_creat+0x27/0x30 fs/open.c:1108
       do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282
       entry_SYSCALL_64_after_swapgs+0x5d/0xdb

       check_prev_add kernel/locking/lockdep.c:1828 [inline]
       check_prevs_add kernel/locking/lockdep.c:1938 [inline]
       validate_chain kernel/locking/lockdep.c:2265 [inline]
       __lock_acquire+0x3019/0x4070 kernel/locking/lockdep.c:3345
       lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756
       percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:35 [inline]
       percpu_down_read include/linux/percpu-rwsem.h:58 [inline]
       __sb_start_write+0x1c0/0x300 fs/super.c:1281
       sb_start_write include/linux/fs.h:1573 [inline]
       mnt_want_write+0x3f/0xb0 fs/namespace.c:391
       do_last fs/namei.c:3400 [inline]
       path_openat+0x11f4/0x3590 fs/namei.c:3534
       do_filp_open+0x197/0x270 fs/namei.c:3568
       do_sys_open+0x30d/0x5c0 fs/open.c:1072
       SYSC_open fs/open.c:1090 [inline]
       SyS_open fs/open.c:1085 [inline]
       SYSC_creat fs/open.c:1110 [inline]
       SyS_creat+0x27/0x30 fs/open.c:1108
       do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282
       entry_SYSCALL_64_after_swapgs+0x5d/0xdb

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&fi->mutex);
                               lock(sb_writers#19);
                               lock(&fi->mutex);
  lock(sb_writers#19);

 *** DEADLOCK ***

1 lock held by syz-executor5/15249:
 #0:  (&fi->mutex){+.+.+.}, at: [<ffffffff81938832>] fuse_lock_inode+0xa2/0xd0 fs/fuse/inode.c:362

stack backtrace:
CPU: 0 PID: 15249 Comm: syz-executor5 Not tainted 4.9.119-g92e8704 #22
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
 ffff8801ca2ff7a8 ffffffff81eb4be9 ffffffff8561dec0 ffffffff8561e220
 ffffffff8561dec0 ffff8801d952a0e8 ffff8801d9529800 ffff8801ca2ff7f0
 ffffffff81426644 0000000000000001 00000000d9529800 0000000000000001
Call Trace:
 [<ffffffff81eb4be9>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81eb4be9>] dump_stack+0xc1/0x128 lib/dump_stack.c:51
 [<ffffffff81426644>] print_circular_bug.cold.51+0x1bd/0x27d kernel/locking/lockdep.c:1202
 [<ffffffff812391a9>] check_prev_add kernel/locking/lockdep.c:1828 [inline]
 [<ffffffff812391a9>] check_prevs_add kernel/locking/lockdep.c:1938 [inline]
 [<ffffffff812391a9>] validate_chain kernel/locking/lockdep.c:2265 [inline]
 [<ffffffff812391a9>] __lock_acquire+0x3019/0x4070 kernel/locking/lockdep.c:3345
 [<ffffffff8123ac70>] lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756
 [<ffffffff8157b710>] percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:35 [inline]
 [<ffffffff8157b710>] percpu_down_read include/linux/percpu-rwsem.h:58 [inline]
 [<ffffffff8157b710>] __sb_start_write+0x1c0/0x300 fs/super.c:1281
 [<ffffffff815e0e3f>] sb_start_write include/linux/fs.h:1573 [inline]
 [<ffffffff815e0e3f>] mnt_want_write+0x3f/0xb0 fs/namespace.c:391
 [<ffffffff815a54c4>] do_last fs/namei.c:3400 [inline]
 [<ffffffff815a54c4>] path_openat+0x11f4/0x3590 fs/namei.c:3534
 [<ffffffff815abb27>] do_filp_open+0x197/0x270 fs/namei.c:3568
 [<ffffffff8156e2fd>] do_sys_open+0x30d/0x5c0 fs/open.c:1072
 [<ffffffff8156e657>] SYSC_open fs/open.c:1090 [inline]
 [<ffffffff8156e657>] SyS_open fs/open.c:1085 [inline]
 [<ffffffff8156e657>] SYSC_creat fs/open.c:1110 [inline]
 [<ffffffff8156e657>] SyS_creat+0x27/0x30 fs/open.c:1108
 [<ffffffff81006316>] do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282
 [<ffffffff839fccd3>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb
SELinux: unrecognized netlink message: protocol=0 nlmsg_type=11634 sclass=netlink_route_socket pig=15396 comm=syz-executor2
program syz-executor2 is using a deprecated SCSI ioctl, please convert it to SG_IO
sd 0:0:1:0: ioctl_internal_command: ILLEGAL REQUEST asc=0x20 ascq=0x0
program syz-executor2 is using a deprecated SCSI ioctl, please convert it to SG_IO
sd 0:0:1:0: ioctl_internal_command: ILLEGAL REQUEST asc=0x20 ascq=0x0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/08/10 00:19 https://android.googlesource.com/kernel/common android-4.9 92e87041ed2d 1fb62d58 .config console log report ci-android-49-kasan-gce-root
* Struck through repros no longer work on HEAD.