====================================================== WARNING: possible circular locking dependency detected 4.19.89-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/23806 is trying to acquire lock: 00000000bfa5df50 (&rp->fetch_lock){+.+.}, at: mon_bin_vma_fault+0x73/0x2d0 drivers/usb/mon/mon_bin.c:1237 but task is already holding lock: 000000000c17d64a (&mm->mmap_sem){++++}, at: __mm_populate+0x270/0x380 mm/gup.c:1262 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&mm->mmap_sem){++++}: __might_fault mm/memory.c:4638 [inline] __might_fault+0x15e/0x1e0 mm/memory.c:4623 _copy_to_user+0x30/0x120 lib/usercopy.c:25 copy_to_user include/linux/uaccess.h:155 [inline] mon_bin_read+0x329/0x640 drivers/usb/mon/mon_bin.c:825 do_loop_readv_writev fs/read_write.c:701 [inline] do_loop_readv_writev fs/read_write.c:688 [inline] do_iter_read+0x490/0x640 fs/read_write.c:925 vfs_readv+0xf0/0x160 fs/read_write.c:987 do_readv+0x15e/0x370 fs/read_write.c:1020 __do_sys_readv fs/read_write.c:1107 [inline] __se_sys_readv fs/read_write.c:1104 [inline] __x64_sys_readv+0x75/0xb0 fs/read_write.c:1104 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&rp->fetch_lock){+.+.}: lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3903 __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0xf7/0x1300 kernel/locking/mutex.c:1072 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087 mon_bin_vma_fault+0x73/0x2d0 drivers/usb/mon/mon_bin.c:1237 __do_fault+0x111/0x480 mm/memory.c:3269 do_read_fault mm/memory.c:3681 [inline] do_fault mm/memory.c:3810 [inline] handle_pte_fault mm/memory.c:4041 [inline] __handle_mm_fault+0x2d78/0x3f80 mm/memory.c:4165 handle_mm_fault+0x1b5/0x690 mm/memory.c:4202 faultin_page mm/gup.c:530 [inline] __get_user_pages+0x609/0x1860 mm/gup.c:730 populate_vma_page_range+0x20d/0x2a0 mm/gup.c:1234 __mm_populate+0x204/0x380 mm/gup.c:1282 mm_populate include/linux/mm.h:2323 [inline] vm_mmap_pgoff+0x213/0x230 mm/util.c:362 ksys_mmap_pgoff+0x4aa/0x630 mm/mmap.c:1586 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:100 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:91 [inline] __x64_sys_mmap+0xe9/0x1b0 arch/x86/kernel/sys_x86_64.c:91 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mm->mmap_sem); lock(&rp->fetch_lock); lock(&mm->mmap_sem); lock(&rp->fetch_lock); *** DEADLOCK *** 1 lock held by syz-executor.0/23806: #0: 000000000c17d64a (&mm->mmap_sem){++++}, at: __mm_populate+0x270/0x380 mm/gup.c:1262 stack backtrace: CPU: 0 PID: 23806 Comm: syz-executor.0 Not tainted 4.19.89-syzkaller #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+0x197/0x210 lib/dump_stack.c:118 print_circular_bug.isra.0.cold+0x1cc/0x28f kernel/locking/lockdep.c:1221 check_prev_add kernel/locking/lockdep.c:1861 [inline] check_prevs_add kernel/locking/lockdep.c:1974 [inline] validate_chain kernel/locking/lockdep.c:2415 [inline] __lock_acquire+0x2e19/0x49c0 kernel/locking/lockdep.c:3411 lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3903 __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0xf7/0x1300 kernel/locking/mutex.c:1072 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087 mon_bin_vma_fault+0x73/0x2d0 drivers/usb/mon/mon_bin.c:1237 __do_fault+0x111/0x480 mm/memory.c:3269 do_read_fault mm/memory.c:3681 [inline] do_fault mm/memory.c:3810 [inline] handle_pte_fault mm/memory.c:4041 [inline] __handle_mm_fault+0x2d78/0x3f80 mm/memory.c:4165 handle_mm_fault+0x1b5/0x690 mm/memory.c:4202 faultin_page mm/gup.c:530 [inline] __get_user_pages+0x609/0x1860 mm/gup.c:730 populate_vma_page_range+0x20d/0x2a0 mm/gup.c:1234 __mm_populate+0x204/0x380 mm/gup.c:1282 mm_populate include/linux/mm.h:2323 [inline] vm_mmap_pgoff+0x213/0x230 mm/util.c:362 ksys_mmap_pgoff+0x4aa/0x630 mm/mmap.c:1586 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:100 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:91 [inline] __x64_sys_mmap+0xe9/0x1b0 arch/x86/kernel/sys_x86_64.c:91 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45a909 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fc4367e3c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 000000000045a909 RDX: 0000000000000001 RSI: 0000000000400000 RDI: 0000000020a05000 RBP: 000000000075bf20 R08: 0000000000000004 R09: 0000000000000000 R10: 0000000000008012 R11: 0000000000000246 R12: 00007fc4367e46d4 R13: 00000000004c7b98 R14: 00000000004de960 R15: 00000000ffffffff kobject: 'loop5' (0000000044577b94): kobject_uevent_env kobject: 'loop5' (0000000044577b94): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop3' (0000000073dfd4e6): kobject_uevent_env kobject: 'loop3' (0000000073dfd4e6): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop2' (000000008f8185b9): kobject_uevent_env kobject: 'loop2' (000000008f8185b9): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop4' (00000000f2f09ad0): kobject_uevent_env kobject: 'loop4' (00000000f2f09ad0): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop1' (000000007276417d): kobject_uevent_env kobject: 'loop1' (000000007276417d): fill_kobj_path: path = '/devices/virtual/block/loop1' kobject: 'loop5' (0000000044577b94): kobject_uevent_env kobject: 'loop5' (0000000044577b94): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop3' (0000000073dfd4e6): kobject_uevent_env kobject: 'loop3' (0000000073dfd4e6): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop2' (000000008f8185b9): kobject_uevent_env kobject: 'loop2' (000000008f8185b9): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop4' (00000000f2f09ad0): kobject_uevent_env kobject: 'loop4' (00000000f2f09ad0): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop1' (000000007276417d): kobject_uevent_env kobject: 'loop1' (000000007276417d): fill_kobj_path: path = '/devices/virtual/block/loop1' kobject: 'loop5' (0000000044577b94): kobject_uevent_env kobject: 'loop5' (0000000044577b94): fill_kobj_path: path = '/devices/virtual/block/loop5' net_ratelimit: 16 callbacks suppressed protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 protocol 88fb is buggy, dev hsr_slave_1 protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 kobject: 'loop0' (000000000d280688): kobject_uevent_env kobject: 'loop0' (000000000d280688): fill_kobj_path: path = '/devices/virtual/block/loop0' protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 kobject: 'loop3' (0000000073dfd4e6): kobject_uevent_env kobject: 'loop3' (0000000073dfd4e6): fill_kobj_path: path = '/devices/virtual/block/loop3' kauditd_printk_skb: 269 callbacks suppressed audit: type=1400 audit(2000000580.201:48092): avc: denied { map } for pid=24055 comm="blkid" path="/lib/x86_64-linux-gnu/libblkid.so.1.1.0" dev="sda1" ino=2825 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 audit: type=1400 audit(2000000580.281:48093): avc: denied { map } for pid=24055 comm="blkid" path="/lib/x86_64-linux-gnu/libc-2.13.so" dev="sda1" ino=2784 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000580.281:48094): avc: denied { map } for pid=24055 comm="blkid" path="/lib/x86_64-linux-gnu/libc-2.13.so" dev="sda1" ino=2784 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000580.281:48095): avc: denied { map } for pid=24061 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kobject: 'loop2' (000000008f8185b9): kobject_uevent_env audit: type=1400 audit(2000000580.291:48096): avc: denied { map } for pid=24061 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kobject: 'loop2' (000000008f8185b9): fill_kobj_path: path = '/devices/virtual/block/loop2' audit: type=1400 audit(2000000580.301:48097): avc: denied { map } for pid=24061 comm="modprobe" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kobject: 'loop1' (000000007276417d): kobject_uevent_env kobject: 'loop1' (000000007276417d): fill_kobj_path: path = '/devices/virtual/block/loop1' audit: type=1400 audit(2000000580.311:48098): avc: denied { map } for pid=24061 comm="modprobe" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kobject: 'loop5' (0000000044577b94): kobject_uevent_env audit: type=1400 audit(2000000580.321:48099): avc: denied { map } for pid=24065 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kobject: 'loop5' (0000000044577b94): fill_kobj_path: path = '/devices/virtual/block/loop5' audit: type=1400 audit(2000000580.321:48100): avc: denied { map } for pid=24065 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kobject: 'loop0' (000000000d280688): kobject_uevent_env kobject: 'loop0' (000000000d280688): fill_kobj_path: path = '/devices/virtual/block/loop0' audit: type=1400 audit(2000000580.341:48101): avc: denied { map } for pid=24055 comm="blkid" path="/lib/x86_64-linux-gnu/libuuid.so.1.3.0" dev="sda1" ino=2819 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kobject: 'loop3' (0000000073dfd4e6): kobject_uevent_env kobject: 'loop3' (0000000073dfd4e6): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop4' (00000000f2f09ad0): kobject_uevent_env kobject: 'loop4' (00000000f2f09ad0): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop5' (0000000044577b94): kobject_uevent_env kobject: 'loop5' (0000000044577b94): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop2' (000000008f8185b9): kobject_uevent_env kobject: 'loop2' (000000008f8185b9): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop1' (000000007276417d): kobject_uevent_env kobject: 'loop1' (000000007276417d): fill_kobj_path: path = '/devices/virtual/block/loop1' kobject: 'loop3' (0000000073dfd4e6): kobject_uevent_env kobject: 'loop3' (0000000073dfd4e6): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop0' (000000000d280688): kobject_uevent_env kobject: 'loop0' (000000000d280688): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop4' (00000000f2f09ad0): kobject_uevent_env kobject: 'loop4' (00000000f2f09ad0): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop5' (0000000044577b94): kobject_uevent_env kobject: 'loop5' (0000000044577b94): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop1' (000000007276417d): kobject_uevent_env kobject: 'loop1' (000000007276417d): fill_kobj_path: path = '/devices/virtual/block/loop1' kobject: 'loop3' (0000000073dfd4e6): kobject_uevent_env kobject: 'loop3' (0000000073dfd4e6): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'loop2' (000000008f8185b9): kobject_uevent_env kobject: 'loop2' (000000008f8185b9): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop4' (00000000f2f09ad0): kobject_uevent_env kobject: 'loop4' (00000000f2f09ad0): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop0' (000000000d280688): kobject_uevent_env kobject: 'loop0' (000000000d280688): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop5' (0000000044577b94): kobject_uevent_env kauditd_printk_skb: 192 callbacks suppressed audit: type=1400 audit(2000000585.251:48294): avc: denied { map } for pid=24353 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kobject: 'loop5' (0000000044577b94): fill_kobj_path: path = '/devices/virtual/block/loop5' audit: type=1400 audit(2000000585.251:48295): avc: denied { map } for pid=24353 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kobject: 'loop1' (000000007276417d): kobject_uevent_env kobject: 'loop1' (000000007276417d): fill_kobj_path: path = '/devices/virtual/block/loop1' audit: type=1400 audit(2000000585.261:48296): avc: denied { map } for pid=24353 comm="blkid" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000585.261:48297): avc: denied { map } for pid=24353 comm="blkid" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kobject: 'loop3' (0000000073dfd4e6): kobject_uevent_env kobject: 'loop3' (0000000073dfd4e6): fill_kobj_path: path = '/devices/virtual/block/loop3' audit: type=1400 audit(2000000585.291:48298): avc: denied { map } for pid=24353 comm="blkid" path="/etc/ld.so.cache" dev="sda1" ino=2251 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 net_ratelimit: 24 callbacks suppressed protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 kobject: 'loop2' (000000008f8185b9): kobject_uevent_env protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 audit: type=1400 audit(2000000585.321:48299): avc: denied { map } for pid=24353 comm="blkid" path="/lib/x86_64-linux-gnu/libblkid.so.1.1.0" dev="sda1" ino=2825 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kobject: 'loop2' (000000008f8185b9): fill_kobj_path: path = '/devices/virtual/block/loop2' audit: type=1400 audit(2000000585.321:48300): avc: denied { map } for pid=24353 comm="blkid" path="/lib/x86_64-linux-gnu/libblkid.so.1.1.0" dev="sda1" ino=2825 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 audit: type=1400 audit(2000000585.331:48301): avc: denied { map } for pid=24354 comm="blkid" path="/etc/ld.so.cache" dev="sda1" ino=2251 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kobject: 'loop0' (000000000d280688): kobject_uevent_env kobject: 'loop0' (000000000d280688): fill_kobj_path: path = '/devices/virtual/block/loop0' audit: type=1400 audit(2000000585.341:48302): avc: denied { map } for pid=24353 comm="blkid" path="/lib/x86_64-linux-gnu/libc-2.13.so" dev="sda1" ino=2784 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kobject: 'loop5' (0000000044577b94): kobject_uevent_env kobject: 'loop5' (0000000044577b94): fill_kobj_path: path = '/devices/virtual/block/loop5' protocol 88fb is buggy, dev hsr_slave_0 audit: type=1400 audit(2000000585.351:48303): avc: denied { map } for pid=24353 comm="blkid" path="/lib/x86_64-linux-gnu/libc-2.13.so" dev="sda1" ino=2784 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 protocol 88fb is buggy, dev hsr_slave_1 kobject: 'loop4' (00000000f2f09ad0): kobject_uevent_env kobject: 'loop4' (00000000f2f09ad0): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop1' (000000007276417d): kobject_uevent_env kobject: 'loop1' (000000007276417d): fill_kobj_path: path = '/devices/virtual/block/loop1'