syzbot


possible deadlock in __might_fault (3)

Status: closed as dup on 2018/09/16 01:51
Reported-by: syzbot+6884a790570df1022b2d@syzkaller.appspotmail.com
First crash: 1396d, last: 925d
Duplicate of (1):
Title Repro Cause bisect Fix bisect Count Last Reported
possible deadlock in mon_bin_vma_fault C done 11427 925d 1392d
similar bugs (7):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in __might_fault C 8978 1565d 1580d 4/22 fixed on 2018/03/23 18:14
linux-4.19 possible deadlock in __might_fault C done 385 921d 1172d 1/1 fixed on 2020/01/18 20:51
linux-4.14 possible deadlock in __might_fault C done 295 930d 1171d 1/1 fixed on 2020/01/09 09:47
android-44 possible deadlock in __might_fault C 6745 1554d 1581d 2/2 fixed on 2018/04/24 18:02
android-49 possible deadlock in __might_fault C 10264 1560d 1581d 3/3 fixed on 2018/04/24 17:23
android-414 possible deadlock in __might_fault 136 943d 1171d 0/1 auto-closed as invalid on 2020/03/25 09:38
upstream possible deadlock in __might_fault (2) C 20 1518d 1521d 9/22 fixed on 2018/07/09 18:05

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
5.4.0-rc3+ #0 Not tainted
------------------------------------------------------
syz-executor562/9322 is trying to acquire lock:
ffff888093e00d18 (&mm->mmap_sem#2){++++}, at: __might_fault+0xfb/0x1e0 mm/memory.c:4449

but task is already holding lock:
ffff8880a9011900 (&rp->fetch_lock){+.+.}, at: mon_bin_fetch+0x37/0x340 drivers/usb/mon/mon_bin.c:909

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&rp->fetch_lock){+.+.}:
       __mutex_lock_common kernel/locking/mutex.c:956 [inline]
       __mutex_lock+0x156/0x13c0 kernel/locking/mutex.c:1103
       mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1118
       mon_bin_vma_fault+0x73/0x2d0 drivers/usb/mon/mon_bin.c:1237
       __do_fault+0x111/0x540 mm/memory.c:3092
       do_cow_fault mm/memory.c:3518 [inline]
       do_fault mm/memory.c:3620 [inline]
       handle_pte_fault mm/memory.c:3849 [inline]
       __handle_mm_fault+0xce8/0x4040 mm/memory.c:3973
       handle_mm_fault+0x3b7/0xaa0 mm/memory.c:4010
       do_user_addr_fault arch/x86/mm/fault.c:1441 [inline]
       __do_page_fault+0x536/0xdd0 arch/x86/mm/fault.c:1506
       do_page_fault+0x38/0x590 arch/x86/mm/fault.c:1530
       page_fault+0x39/0x40 arch/x86/entry/entry_64.S:1202

-> #0 (&mm->mmap_sem#2){++++}:
       check_prev_add kernel/locking/lockdep.c:2476 [inline]
       check_prevs_add kernel/locking/lockdep.c:2581 [inline]
       validate_chain kernel/locking/lockdep.c:2971 [inline]
       __lock_acquire+0x2596/0x4a00 kernel/locking/lockdep.c:3955
       lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4487
       __might_fault mm/memory.c:4450 [inline]
       __might_fault+0x15e/0x1e0 mm/memory.c:4435
       mon_bin_fetch+0x26f/0x340 drivers/usb/mon/mon_bin.c:928
       mon_bin_ioctl+0x21e/0xc80 drivers/usb/mon/mon_bin.c:1091
       vfs_ioctl fs/ioctl.c:46 [inline]
       file_ioctl fs/ioctl.c:509 [inline]
       do_vfs_ioctl+0xdb6/0x13e0 fs/ioctl.c:696
       ksys_ioctl+0xab/0xd0 fs/ioctl.c:713
       __do_sys_ioctl fs/ioctl.c:720 [inline]
       __se_sys_ioctl fs/ioctl.c:718 [inline]
       __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718
       do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
       entry_SYSCALL_64_after_hwframe+0x49/0xbe

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&rp->fetch_lock);
                               lock(&mm->mmap_sem#2);
                               lock(&rp->fetch_lock);
  lock(&mm->mmap_sem#2);

 *** DEADLOCK ***

1 lock held by syz-executor562/9322:
 #0: ffff8880a9011900 (&rp->fetch_lock){+.+.}, at: mon_bin_fetch+0x37/0x340 drivers/usb/mon/mon_bin.c:909

stack backtrace:
CPU: 0 PID: 9322 Comm: syz-executor562 Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x172/0x1f0 lib/dump_stack.c:113
 print_circular_bug.isra.0.cold+0x163/0x172 kernel/locking/lockdep.c:1685
 check_noncircular+0x32e/0x3e0 kernel/locking/lockdep.c:1809
 check_prev_add kernel/locking/lockdep.c:2476 [inline]
 check_prevs_add kernel/locking/lockdep.c:2581 [inline]
 validate_chain kernel/locking/lockdep.c:2971 [inline]
 __lock_acquire+0x2596/0x4a00 kernel/locking/lockdep.c:3955
 lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4487
 __might_fault mm/memory.c:4450 [inline]
 __might_fault+0x15e/0x1e0 mm/memory.c:4435
 mon_bin_fetch+0x26f/0x340 drivers/usb/mon/mon_bin.c:928
 mon_bin_ioctl+0x21e/0xc80 drivers/usb/mon/mon_bin.c:1091
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:509 [inline]
 do_vfs_ioctl+0xdb6/0x13e0 fs/ioctl.c:696
 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713
 __do_sys_ioctl fs/ioctl.c:720 [inline]
 __se_sys_ioctl fs/ioctl.c:718 [inline]
 __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718
 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x44a8f9
Code: e8 6c d9 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 0f 83 bb d0 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f5a7c205ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000006dcc58 RCX: 000000000044a8f9
RDX: 0000000020000140 RSI: 00000000c0109207 RDI: 0000000000000003
RBP: 00000000006dcc50 R08: 00007f5a7c206700 R09: 0000000000000000
R10: 00007f5a7c206700 R11: 0000000000000246 R12: 00000000006dcc5c
R13: 00007fff409d459f R14: 00007f5a7c2069c0 R15: 000000000000002d
kobject: 'batman_adv' (00000000b8600027): kobject_uevent_env
kobject: 'batman_adv' (00000000b8600027): kobject_uevent_env: filter function caused the event to drop!
kobject: 'batman_adv' (00000000b8600027): kobject_cleanup, parent 000000001e201580
kobject: 'batman_adv' (00000000b8600027): calling ktype release
kobject: (00000000b8600027): dynamic_kobj_release
kobject: 'batman_adv': free name
kobject: 'rx-0' (000000001ae95ce0): kobject_cleanup, parent 0000000018ef65f1
kobject: 'rx-0' (000000001ae95ce0): auto cleanup 'remove' event
kobject: 'rx-0' (000000001ae95ce0): kobject_uevent_env
kobject: 'rx-0' (000000001ae95ce0): fill_kobj_path: path = '/devices/virtual/net/syz_tun/queues/rx-0'
kobject: 'rx-0' (000000001ae95ce0): auto cleanup kobject_del
kobject: 'rx-0' (000000001ae95ce0): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000ad462c1e): kobject_cleanup, parent 0000000018ef65f1
kobject: 'tx-0' (00000000ad462c1e): auto cleanup 'remove' event
kobject: 'tx-0' (00000000ad462c1e): kobject_uevent_env
kobject: 'tx-0' (00000000ad462c1e): fill_kobj_path: path = '/devices/virtual/net/syz_tun/queues/tx-0'
kobject: 'tx-0' (00000000ad462c1e): auto cleanup kobject_del
kobject: 'tx-0' (00000000ad462c1e): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (0000000018ef65f1): kobject_cleanup, parent 000000001e201580
kobject: 'queues' (0000000018ef65f1): calling ktype release
kobject: 'queues' (0000000018ef65f1): kset_release
kobject: 'queues': free name
kobject: 'syz_tun' (000000006faf92bc): kobject_uevent_env
kobject: 'syz_tun' (000000006faf92bc): fill_kobj_path: path = '/devices/virtual/net/syz_tun'

Crashes (10722):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2019/10/19 12:09 upstream b9959c7a347d 8c88c9c1 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2019/10/19 11:46 upstream b9959c7a347d 8c88c9c1 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2019/10/19 11:24 upstream b9959c7a347d 8c88c9c1 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2019/10/19 00:15 upstream 0e2adab6cf28 8c88c9c1 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2019/10/18 23:23 upstream 0e2adab6cf28 8c88c9c1 .config log report syz C
ci-upstream-kasan-gce-smack-root 2019/10/14 09:16 upstream d4615e5a4680 2f661ec4 .config log report syz C
ci-upstream-kasan-gce-smack-root 2019/10/14 08:52 upstream d4615e5a4680 2f661ec4 .config log report syz C
ci-upstream-kasan-gce-root 2019/10/14 08:43 upstream d4615e5a4680 2f661ec4 .config log report syz C
ci-upstream-kasan-gce-smack-root 2019/10/14 08:29 upstream d4615e5a4680 2f661ec4 .config log report syz C
ci-upstream-kasan-gce-root 2019/10/14 08:15 upstream d4615e5a4680 2f661ec4 .config log report syz C
ci-upstream-kasan-gce-root 2019/10/14 07:49 upstream d4615e5a4680 2f661ec4 .config log report syz C
ci-upstream-kasan-gce-root 2019/10/14 04:03 upstream da94001239cc 2f661ec4 .config log report syz C
ci-upstream-kasan-gce-root 2019/10/13 23:22 upstream da94001239cc 2f661ec4 .config log report syz C
ci-upstream-kasan-gce-smack-root 2019/10/13 23:02 upstream da94001239cc 2f661ec4 .config log report syz C
ci-upstream-kasan-gce-root 2019/10/13 22:57 upstream da94001239cc 2f661ec4 .config log report syz C
ci-upstream-kasan-gce-smack-root 2019/10/13 22:39 upstream da94001239cc 2f661ec4 .config log report syz C
ci-upstream-kasan-gce-root 2019/10/13 22:05 upstream da94001239cc 2f661ec4 .config log report syz C
ci-upstream-kasan-gce-smack-root 2019/10/13 21:50 upstream da94001239cc 2f661ec4 .config log report syz C
ci-upstream-kasan-gce 2019/10/06 11:32 upstream b145b0eb2031 f3f7d9c8 .config log report syz C
ci-upstream-kasan-gce 2019/10/06 06:57 upstream b145b0eb2031 f3f7d9c8 .config log report syz C
ci-upstream-kasan-gce 2019/10/06 06:14 upstream b145b0eb2031 f3f7d9c8 .config log report syz C
ci-upstream-kasan-gce-386 2019/10/06 21:14 upstream 43b815c6a8e7 f3f7d9c8 .config log report syz C
ci-upstream-kasan-gce-386 2019/10/06 18:57 upstream 43b815c6a8e7 f3f7d9c8 .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2019/10/18 02:25 linux-next 3ef845da3c3b 8c88c9c1 .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2019/10/18 02:02 linux-next 3ef845da3c3b 8c88c9c1 .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2019/10/18 01:35 linux-next 3ef845da3c3b 8c88c9c1 .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2019/10/17 15:43 linux-next 3ef845da3c3b 8c88c9c1 .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2019/10/17 11:55 linux-next 3ef845da3c3b 8c88c9c1 .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2018/09/01 07:48 linux-next a880148cb2af a4718693 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2019/10/19 10:48 upstream b9959c7a347d 8c88c9c1 .config log report syz
ci-upstream-kasan-gce-selinux-root 2019/10/19 07:30 upstream b9959c7a347d 8c88c9c1 .config log report syz
ci-upstream-kasan-gce-selinux-root 2019/10/19 05:14 upstream b9959c7a347d 8c88c9c1 .config log report syz
ci-upstream-kasan-gce-smack-root 2019/10/15 14:17 upstream 5bc52f64e884 b5268b89 .config log report syz
ci-upstream-kasan-gce-smack-root 2019/10/14 03:22 upstream da94001239cc 2f661ec4 .config log report syz
ci-upstream-kasan-gce-root 2019/10/14 01:15 upstream da94001239cc 2f661ec4 .config log report syz
ci-upstream-kasan-gce-smack-root 2019/10/14 01:10 upstream da94001239cc 2f661ec4 .config log report syz
ci-upstream-kasan-gce-root 2019/10/13 20:26 upstream da94001239cc 2f661ec4 .config log report syz
ci-upstream-kasan-gce-smack-root 2019/10/13 18:28 upstream da94001239cc 2f661ec4 .config log report syz
ci-upstream-kasan-gce 2019/10/06 09:16 upstream b145b0eb2031 f3f7d9c8 .config log report syz
ci-upstream-linux-next-kasan-gce-root 2019/10/18 00:58 linux-next 3ef845da3c3b 8c88c9c1 .config log report syz
ci-upstream-linux-next-kasan-gce-root 2019/10/17 16:02 linux-next 3ef845da3c3b 8c88c9c1 .config log report syz
ci-upstream-kasan-gce 2019/12/14 21:56 upstream e31736d9fae8 eef6e580 .config log report
ci-upstream-kasan-gce-root 2019/12/14 09:28 upstream e31736d9fae8 eef6e580 .config log report
ci-upstream-kasan-gce-selinux-root 2019/12/14 09:23 upstream e31736d9fae8 eef6e580 .config log report
ci-upstream-kasan-gce 2019/12/13 05:49 upstream ae4b064e2a61 08003f64 .config log report
ci-upstream-kasan-gce-selinux-root 2019/12/09 08:15 upstream e42617b825f8 1508f453 .config log report
ci-upstream-kasan-gce 2019/12/07 22:03 upstream ad910e36da4c 1508f453 .config log report
ci-upstream-kasan-gce 2019/12/07 10:57 upstream 7ada90eb9c7a 85f26751 .config log report
ci-upstream-kasan-gce-selinux-root 2019/12/06 16:55 upstream b0d4beaa5a4b 85f26751 .config log report
ci-upstream-kasan-gce 2019/12/04 09:57 upstream 63de37476ebd 0ecb9746 .config log report
ci-upstream-kasan-gce 2019/12/04 07:18 upstream 76bb8b05960c ae13a849 .config log report
ci-upstream-kasan-gce 2019/12/03 18:26 upstream 76bb8b05960c ae13a849 .config log report
ci-upstream-kasan-gce 2019/12/03 14:29 upstream 76bb8b05960c ab342da3 .config log report
ci-upstream-kasan-gce-smack-root 2019/12/02 04:54 upstream ceb307474506 f879db37 .config log report
ci-upstream-kasan-gce-smack-root 2019/12/02 00:55 upstream b94ae8ad9fe7 f879db37 .config log report
ci-upstream-kasan-gce-smack-root 2019/12/01 23:42 upstream b94ae8ad9fe7 f879db37 .config log report
ci-upstream-kasan-gce 2019/12/01 13:40 upstream b94ae8ad9fe7 a76bf83f .config log report
ci-upstream-kasan-gce-root 2019/11/30 22:14 upstream 32ef9553635a a76bf83f .config log report
ci-upstream-kasan-gce-root 2019/11/30 02:47 upstream 81b6b96475ac 3a75be00 .config log report
ci-upstream-kasan-gce-root 2019/11/28 12:06 upstream a6ed68d6468b 46869e3e .config log report
ci-upstream-kasan-gce-smack-root 2019/11/27 22:29 upstream d76886972823 0d63f89c .config log report
ci-upstream-kasan-gce-smack-root 2019/11/27 17:42 upstream 89d57dddd7d3 0d63f89c .config log report
ci-upstream-kasan-gce-386 2019/12/13 23:04 upstream 37d4e84f765b 5b2ca5da .config log report
ci-upstream-kasan-gce-386 2019/12/12 19:24 upstream ae4b064e2a61 08003f64 .config log report
ci-upstream-kasan-gce-386 2019/12/11 06:57 upstream 6794862a16ef 101194eb .config log report
ci-upstream-kasan-gce-386 2019/12/09 12:16 upstream e42617b825f8 b31eda3d .config log report
ci-upstream-kasan-gce-386 2019/12/08 17:22 upstream 9455d25f4e3b 1508f453 .config log report
ci-upstream-kasan-gce-386 2019/12/06 23:01 upstream 7ada90eb9c7a 85f26751 .config log report
ci-upstream-kasan-gce-386 2019/12/02 21:57 upstream 596cf45cbf6e ab342da3 .config log report
ci-upstream-kasan-gce-386 2019/12/02 08:33 upstream ceb307474506 f879db37 .config log report
ci-upstream-kasan-gce-386 2019/12/01 00:10 upstream 32ef9553635a a76bf83f .config log report
ci-upstream-kasan-gce-386 2019/11/29 15:28 upstream 81b6b96475ac d29b9e84 .config log report
ci-upstream-kasan-gce-386 2019/11/29 13:47 upstream 81b6b96475ac d29b9e84 .config log report
ci-upstream-kasan-gce-386 2019/11/29 02:11 upstream 81b6b96475ac 76357d6f .config log report
ci-upstream-kasan-gce-386 2019/11/28 00:24 upstream d76886972823 0d63f89c .config log report
ci-upstream-kasan-gce-386 2019/11/27 22:53 upstream d76886972823 0d63f89c .config log report
ci-upstream-kasan-gce-386 2019/11/27 18:53 upstream 89d57dddd7d3 0d63f89c .config log report
ci-upstream-kasan-gce-386 2018/08/30 13:54 upstream 58c3f14f86c9 938220fd .config log report
ci-upstream-linux-next-kasan-gce-root 2019/12/09 13:41 linux-next 6cf8298daad0 b31eda3d .config log report
ci-upstream-linux-next-kasan-gce-root 2019/12/09 09:24 linux-next 6cf8298daad0 1508f453 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/12/07 13:22 linux-next 558c2bf52f61 85f26751 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/12/06 17:46 linux-next 838333c80c4f 85f26751 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/12/05 07:33 linux-next 282ffdf30a3e b2088328 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/12/04 14:50 linux-next c7c32c43e831 b2088328 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/12/03 12:57 linux-next 1ab75b2e415a ab342da3 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/11/29 09:06 linux-next 419593dad843 76357d6f .config log report
ci-upstream-linux-next-kasan-gce-root 2019/11/29 00:40 linux-next d26b0e226f22 76357d6f .config log report
ci-upstream-linux-next-kasan-gce-root 2019/11/28 13:20 linux-next d26b0e226f22 46869e3e .config log report
ci-upstream-linux-next-kasan-gce-root 2019/11/27 16:31 linux-next 1875ff320f14 0d63f89c .config log report