syzbot


possible deadlock in fuse_reverse_inval_entry

Status: upstream: reported C repro on 2021/06/27 09:34
Reported-by: syzbot+f0f1304eb6c718dd8ef4@syzkaller.appspotmail.com
First crash: 1273d, last: 691d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in fuse_reverse_inval_entry fuse C error 1 1200d 1227d 20/28 fixed on 2022/03/08 16:11
linux-4.14 possible deadlock in fuse_reverse_inval_entry C error 1 837d 1229d 0/1 upstream: reported C repro on 2021/08/10 04:41
Fix bisection attempts (4)
Created Duration User Patch Repo Result
2021/10/28 19:01 18m bisect fix linux-4.19.y error job log
2021/09/25 10:36 28m bisect fix linux-4.19.y OK (0) job log log
2021/08/26 10:09 26m bisect fix linux-4.19.y OK (0) job log log
2021/07/27 09:40 29m bisect fix linux-4.19.y OK (0) job log log

Sample crash report:
============================================
WARNING: possible recursive locking detected
4.19.211-syzkaller #0 Not tainted
--------------------------------------------
syz-executor410/8111 is trying to acquire lock:
00000000889d2034 (&type->i_mutex_dir_key#7){++++}, at: inode_lock include/linux/fs.h:748 [inline]
00000000889d2034 (&type->i_mutex_dir_key#7){++++}, at: fuse_reverse_inval_entry+0x2e1/0x660 fs/fuse/dir.c:1006

but task is already holding lock:
000000002dcc6122 (&type->i_mutex_dir_key#7){++++}, at: inode_lock include/linux/fs.h:748 [inline]
000000002dcc6122 (&type->i_mutex_dir_key#7){++++}, at: fuse_reverse_inval_entry+0xaa/0x660 fs/fuse/dir.c:987

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&type->i_mutex_dir_key#7);
  lock(&type->i_mutex_dir_key#7);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

2 locks held by syz-executor410/8111:
 #0: 00000000c09bad4f (&fc->killsb){.+.+}, at: fuse_notify_delete fs/fuse/dev.c:1582 [inline]
 #0: 00000000c09bad4f (&fc->killsb){.+.+}, at: fuse_notify fs/fuse/dev.c:1819 [inline]
 #0: 00000000c09bad4f (&fc->killsb){.+.+}, at: fuse_dev_do_write+0x2343/0x2bc0 fs/fuse/dev.c:1894
 #1: 000000002dcc6122 (&type->i_mutex_dir_key#7){++++}, at: inode_lock include/linux/fs.h:748 [inline]
 #1: 000000002dcc6122 (&type->i_mutex_dir_key#7){++++}, at: fuse_reverse_inval_entry+0xaa/0x660 fs/fuse/dir.c:987

stack backtrace:
CPU: 1 PID: 8111 Comm: syz-executor410 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_deadlock_bug kernel/locking/lockdep.c:1764 [inline]
 check_deadlock kernel/locking/lockdep.c:1808 [inline]
 validate_chain kernel/locking/lockdep.c:2404 [inline]
 __lock_acquire.cold+0x121/0x57e kernel/locking/lockdep.c:3416
 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908
 down_write+0x34/0x90 kernel/locking/rwsem.c:70
 inode_lock include/linux/fs.h:748 [inline]
 fuse_reverse_inval_entry+0x2e1/0x660 fs/fuse/dir.c:1006
 fuse_notify_delete fs/fuse/dev.c:1585 [inline]
 fuse_notify fs/fuse/dev.c:1819 [inline]
 fuse_dev_do_write+0x239e/0x2bc0 fs/fuse/dev.c:1894
 fuse_dev_write+0x153/0x1e0 fs/fuse/dev.c:1978
 call_write_iter include/linux/fs.h:1821 [inline]
 new_sync_write fs/read_write.c:474 [inline]
 __vfs_write+0x51b/0x770 fs/read_write.c:487
 vfs_write+0x1f3/0x540 fs/read_write.c:549
 ksys_write+0x12b/0x2a0 fs/read_write.c:599
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f1afebf6769
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f1afeba82f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: fffff

Crashes (89):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/07/16 12:26 linux-4.19.y 3f8a27f9e27b 95cb00d1 .config console log report syz C ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/07/16 11:15 linux-4.19.y 3f8a27f9e27b 95cb00d1 .config console log report syz C ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2021/06/27 09:33 linux-4.19.y eb575cd5d7f6 9d2ab5df .config console log report syz C ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2023/01/30 12:41 linux-4.19.y 3f8a27f9e27b b68fb8d6 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2023/01/29 02:06 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2023/01/04 09:07 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2023/01/03 12:45 linux-4.19.y 3f8a27f9e27b f0036e18 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2023/01/02 22:33 linux-4.19.y 3f8a27f9e27b ab32d508 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2023/01/02 16:54 linux-4.19.y 3f8a27f9e27b ab32d508 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2023/01/02 11:58 linux-4.19.y 3f8a27f9e27b ab32d508 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2023/01/01 22:11 linux-4.19.y 3f8a27f9e27b ab32d508 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/12/30 23:49 linux-4.19.y 3f8a27f9e27b ab32d508 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/12/30 21:00 linux-4.19.y 3f8a27f9e27b ab32d508 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/12/29 12:23 linux-4.19.y 3f8a27f9e27b 44712fbc .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/12/28 23:29 linux-4.19.y 3f8a27f9e27b 44712fbc .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/12/27 14:18 linux-4.19.y 3f8a27f9e27b 44712fbc .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/12/22 14:11 linux-4.19.y 3f8a27f9e27b 9da18ae8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/12/21 16:45 linux-4.19.y 3f8a27f9e27b 4067838e .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/12/21 15:42 linux-4.19.y 3f8a27f9e27b 4067838e .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/12/20 19:04 linux-4.19.y 3f8a27f9e27b d3e76707 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/12/20 05:37 linux-4.19.y 3f8a27f9e27b c52b2efb .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/12/20 00:51 linux-4.19.y 3f8a27f9e27b c52b2efb .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/11/15 23:59 linux-4.19.y 3f8a27f9e27b 3a127a31 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/11/14 23:13 linux-4.19.y 3f8a27f9e27b 97de9cfc .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/11/14 11:22 linux-4.19.y 3f8a27f9e27b 943f4cb8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/11/13 18:35 linux-4.19.y 3f8a27f9e27b 7ba4d859 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/11/12 11:28 linux-4.19.y 3f8a27f9e27b f42ee5d8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/11/07 14:04 linux-4.19.y 3f8a27f9e27b a779b11a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/11/07 13:19 linux-4.19.y 3f8a27f9e27b a779b11a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/11/06 17:01 linux-4.19.y 3f8a27f9e27b 6d752409 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/11/03 22:52 linux-4.19.y 3f8a27f9e27b 6d752409 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/11/03 05:26 linux-4.19.y 3f8a27f9e27b 7a2ebf95 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/11/01 22:28 linux-4.19.y 3f8a27f9e27b 08977f5d .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/11/01 04:46 linux-4.19.y 3f8a27f9e27b a1d8560a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/11/01 03:00 linux-4.19.y 3f8a27f9e27b a1d8560a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/10/29 16:05 linux-4.19.y 3f8a27f9e27b 2a71366b .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/10/29 02:11 linux-4.19.y 3f8a27f9e27b 899d812a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/10/28 13:36 linux-4.19.y 3f8a27f9e27b 8168b69e .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/10/27 23:10 linux-4.19.y 3f8a27f9e27b 5c716ff6 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/10/27 13:43 linux-4.19.y 3f8a27f9e27b 5c716ff6 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/10/27 02:39 linux-4.19.y 3f8a27f9e27b 86777b7f .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/10/26 20:18 linux-4.19.y 3f8a27f9e27b 86777b7f .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/10/26 01:12 linux-4.19.y 3f8a27f9e27b 2159e4d2 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/08/08 16:17 linux-4.19.y 3f8a27f9e27b da700653 .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/08/06 13:52 linux-4.19.y 3f8a27f9e27b 88e3a122 .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/08/05 20:34 linux-4.19.y 3f8a27f9e27b e853abd9 .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/08/05 09:54 linux-4.19.y 3f8a27f9e27b a65a7ce9 .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/08/02 20:36 linux-4.19.y 3f8a27f9e27b 1c9013ac .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/08/02 20:06 linux-4.19.y 3f8a27f9e27b 1c9013ac .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/08/01 17:21 linux-4.19.y 3f8a27f9e27b fef302b1 .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/07/30 06:07 linux-4.19.y 3f8a27f9e27b fef302b1 .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/07/29 13:26 linux-4.19.y 3f8a27f9e27b fef302b1 .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/07/20 19:27 linux-4.19.y 3f8a27f9e27b 88cb1383 .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/07/20 19:27 linux-4.19.y 3f8a27f9e27b 88cb1383 .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/07/20 15:12 linux-4.19.y 3f8a27f9e27b 88cb1383 .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/07/19 22:24 linux-4.19.y 3f8a27f9e27b 775344bc .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/07/19 21:40 linux-4.19.y 3f8a27f9e27b 775344bc .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/07/19 12:51 linux-4.19.y 3f8a27f9e27b 72a3cc0c .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/07/19 10:33 linux-4.19.y 3f8a27f9e27b 72a3cc0c .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/07/19 09:34 linux-4.19.y 3f8a27f9e27b 72a3cc0c .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/07/18 13:59 linux-4.19.y 3f8a27f9e27b ff988920 .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
2022/07/16 10:55 linux-4.19.y 3f8a27f9e27b 95cb00d1 .config console log report info ci2-linux-4-19 possible deadlock in fuse_reverse_inval_entry
* Struck through repros no longer work on HEAD.