====================================================== WARNING: possible circular locking dependency detected 4.14.146 #0 Not tainted ------------------------------------------------------ syz-executor.0/23126 is trying to acquire lock: (&rp->fetch_lock){+.+.}, at: [] mon_bin_vma_fault+0x6f/0x280 drivers/usb/mon/mon_bin.c:1236 but task is already holding lock: (&mm->mmap_sem){++++}, at: [] __mm_populate+0x1e5/0x2c0 mm/gup.c:1259 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&mm->mmap_sem){++++}: lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3991 __might_fault mm/memory.c:4584 [inline] __might_fault+0x143/0x1d0 mm/memory.c:4569 mon_bin_fetch+0x212/0x2e0 drivers/usb/mon/mon_bin.c:928 mon_bin_ioctl+0x1c5/0xb50 drivers/usb/mon/mon_bin.c:1090 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #0 (&rp->fetch_lock){+.+.}: kobject: 'kvm' (ffff888219fbcd90): kobject_uevent_env check_prev_add kernel/locking/lockdep.c:1901 [inline] check_prevs_add kernel/locking/lockdep.c:2018 [inline] validate_chain kernel/locking/lockdep.c:2460 [inline] __lock_acquire+0x2cb3/0x4620 kernel/locking/lockdep.c:3487 lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3991 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1470 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 mon_bin_vma_fault+0x6f/0x280 drivers/usb/mon/mon_bin.c:1236 __do_fault+0x104/0x390 mm/memory.c:3223 kobject: 'kvm' (ffff888219fbcd90): fill_kobj_path: path = '/devices/virtual/misc/kvm' do_cow_fault mm/memory.c:3662 [inline] do_fault mm/memory.c:3761 [inline] handle_pte_fault mm/memory.c:3989 [inline] __handle_mm_fault+0xde1/0x3470 mm/memory.c:4113 handle_mm_fault+0x293/0x7c0 mm/memory.c:4150 faultin_page mm/gup.c:514 [inline] __get_user_pages+0x465/0x1220 mm/gup.c:714 populate_vma_page_range+0x18e/0x230 mm/gup.c:1231 kobject: 'kvm' (ffff888219fbcd90): kobject_uevent_env __mm_populate+0x198/0x2c0 mm/gup.c:1279 kobject: 'kvm' (ffff888219fbcd90): fill_kobj_path: path = '/devices/virtual/misc/kvm' mm_populate include/linux/mm.h:2187 [inline] vm_mmap_pgoff+0x1be/0x1d0 mm/util.c:338 SYSC_mmap_pgoff mm/mmap.c:1551 [inline] SyS_mmap_pgoff+0x3ca/0x520 mm/mmap.c:1509 SYSC_mmap arch/x86/kernel/sys_x86_64.c:100 [inline] SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:91 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 kobject: 'kvm' (ffff888219fbcd90): kobject_uevent_env entry_SYSCALL_64_after_hwframe+0x42/0xb7 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mm->mmap_sem); lock(&rp->fetch_lock); lock( kobject: 'kvm' (ffff888219fbcd90): fill_kobj_path: path = '/devices/virtual/misc/kvm' &mm->mmap_sem); lock(&rp->fetch_lock); *** DEADLOCK *** 1 lock held by syz-executor.0/23126: #0: (&mm->mmap_sem){++++}, at: [] __mm_populate+0x1e5/0x2c0 mm/gup.c:1259 stack backtrace: CPU: 1 PID: 23126 Comm: syz-executor.0 Not tainted 4.14.146 #0 kobject: 'kvm' (ffff888219fbcd90): kobject_uevent_env Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x138/0x197 lib/dump_stack.c:53 print_circular_bug.isra.0.cold+0x1cc/0x28f kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1901 [inline] check_prevs_add kernel/locking/lockdep.c:2018 [inline] validate_chain kernel/locking/lockdep.c:2460 [inline] __lock_acquire+0x2cb3/0x4620 kernel/locking/lockdep.c:3487 kobject: 'kvm' (ffff888219fbcd90): fill_kobj_path: path = '/devices/virtual/misc/kvm' lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3991 kobject: 'kvm' (ffff888219fbcd90): kobject_uevent_env __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1470 kernel/locking/mutex.c:893 kobject: 'kvm' (ffff888219fbcd90): fill_kobj_path: path = '/devices/virtual/misc/kvm' kobject: 'loop2' (ffff8880a49a69a0): kobject_uevent_env kobject: 'kvm' (ffff888219fbcd90): kobject_uevent_env kobject: 'loop2' (ffff8880a49a69a0): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'kvm' (ffff888219fbcd90): fill_kobj_path: path = '/devices/virtual/misc/kvm' mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 mon_bin_vma_fault+0x6f/0x280 drivers/usb/mon/mon_bin.c:1236 __do_fault+0x104/0x390 mm/memory.c:3223 do_cow_fault mm/memory.c:3662 [inline] do_fault mm/memory.c:3761 [inline] handle_pte_fault mm/memory.c:3989 [inline] __handle_mm_fault+0xde1/0x3470 mm/memory.c:4113 handle_mm_fault+0x293/0x7c0 mm/memory.c:4150 faultin_page mm/gup.c:514 [inline] __get_user_pages+0x465/0x1220 mm/gup.c:714 populate_vma_page_range+0x18e/0x230 mm/gup.c:1231 __mm_populate+0x198/0x2c0 mm/gup.c:1279 mm_populate include/linux/mm.h:2187 [inline] vm_mmap_pgoff+0x1be/0x1d0 mm/util.c:338 SYSC_mmap_pgoff mm/mmap.c:1551 [inline] SyS_mmap_pgoff+0x3ca/0x520 mm/mmap.c:1509 SYSC_mmap arch/x86/kernel/sys_x86_64.c:100 [inline] SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:91 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x459a29 RSP: 002b:00007f571a8bbc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 0000000000459a29 RDX: 0000000001000002 RSI: 0000000000400300 RDI: 0000000020a05000 RBP: 000000000075bfc8 R08: 0000000000000009 R09: 0000000000000000 R10: 0000000000008012 R11: 0000000000000246 R12: 00007f571a8bc6d4 R13: 00000000004c5f27 R14: 00000000004dabb8 R15: 00000000ffffffff net_ratelimit: 18 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 kauditd_printk_skb: 161 callbacks suppressed audit: type=1400 audit(1569847011.792:14549): avc: denied { map } for pid=23123 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 audit: type=1400 audit(1569847011.802:14550): avc: denied { map } for pid=23130 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 protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 audit: type=1400 audit(1569847011.802:14551): avc: denied { map } for pid=23130 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 audit: type=1400 audit(1569847011.812:14552): avc: denied { map } for pid=23130 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: 'kvm' (ffff888219fbcd90): kobject_uevent_env audit: type=1400 audit(1569847011.822:14553): avc: denied { map } for pid=23130 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: 'kvm' (ffff888219fbcd90): fill_kobj_path: path = '/devices/virtual/misc/kvm' audit: type=1400 audit(1569847011.822:14554): avc: denied { map } for pid=23130 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: 'kvm' (ffff888219fbcd90): kobject_uevent_env audit: type=1400 audit(1569847011.822:14555): avc: denied { map } for pid=23134 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: 'kvm' (ffff888219fbcd90): fill_kobj_path: path = '/devices/virtual/misc/kvm' audit: type=1400 audit(1569847011.832:14556): avc: denied { map } for pid=23134 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 audit: type=1400 audit(1569847011.832:14557): avc: denied { map } for pid=23130 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_0 protocol 88fb is buggy, dev hsr_slave_1 audit: type=1400 audit(1569847011.832:14558): avc: denied { map } for pid=23130 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: 'loop0' (ffff888098ffd5a0): kobject_uevent_env kobject: 'loop0' (ffff888098ffd5a0): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop2' (ffff8880a49a69a0): kobject_uevent_env kobject: 'loop2' (ffff8880a49a69a0): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop1' (ffff8880a494e920): kobject_uevent_env kobject: 'loop1' (ffff8880a494e920): fill_kobj_path: path = '/devices/virtual/block/loop1' kobject: 'loop4' (ffff8880a4a39320): kobject_uevent_env kobject: 'loop4' (ffff8880a4a39320): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop0' (ffff888098ffd5a0): kobject_uevent_env kobject: 'loop0' (ffff888098ffd5a0): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop0' (ffff888098ffd5a0): kobject_uevent_env kobject: 'loop0' (ffff888098ffd5a0): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop2' (ffff8880a49a69a0): kobject_uevent_env kobject: 'loop2' (ffff8880a49a69a0): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop1' (ffff8880a494e920): kobject_uevent_env kobject: 'loop1' (ffff8880a494e920): fill_kobj_path: path = '/devices/virtual/block/loop1' hfsplus: unable to find HFS+ superblock kobject: 'loop1' (ffff8880a494e920): kobject_uevent_env kobject: 'loop1' (ffff8880a494e920): fill_kobj_path: path = '/devices/virtual/block/loop1' kobject: 'loop1' (ffff8880a494e920): kobject_uevent_env kobject: 'loop1' (ffff8880a494e920): fill_kobj_path: path = '/devices/virtual/block/loop1' kobject: 'loop4' (ffff8880a4a39320): kobject_uevent_env kobject: 'loop4' (ffff8880a4a39320): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop1' (ffff8880a494e920): kobject_uevent_env kobject: 'loop2' (ffff8880a49a69a0): kobject_uevent_env kobject: 'loop1' (ffff8880a494e920): fill_kobj_path: path = '/devices/virtual/block/loop1' kobject: 'loop2' (ffff8880a49a69a0): fill_kobj_path: path = '/devices/virtual/block/loop2' hfsplus: unable to find HFS+ superblock kobject: 'loop4' (ffff8880a4a39320): kobject_uevent_env kobject: 'loop4' (ffff8880a4a39320): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop1' (ffff8880a494e920): kobject_uevent_env kobject: 'loop1' (ffff8880a494e920): fill_kobj_path: path = '/devices/virtual/block/loop1' kobject: 'loop1' (ffff8880a494e920): kobject_uevent_env kobject: 'loop1' (ffff8880a494e920): fill_kobj_path: path = '/devices/virtual/block/loop1' net_ratelimit: 26 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 protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 kauditd_printk_skb: 100 callbacks suppressed audit: type=1804 audit(1569847018.372:14659): pid=23202 uid=0 auid=4294967295 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 op="invalid_pcr" cause="open_writers" comm="syz-executor.0" name="/root/syzkaller-testdir902650667/syzkaller.LiQj26/628/bus" dev="sda1" ino=17042 res=1 protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 kobject: 'loop2' (ffff8880a49a69a0): kobject_uevent_env kobject: 'loop2' (ffff8880a49a69a0): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop4' (ffff8880a4a39320): kobject_uevent_env hfsplus: invalid session number or type of track hfsplus: unable to find HFS+ superblock kobject: 'loop4' (ffff8880a4a39320): fill_kobj_path: path = '/devices/virtual/block/loop4' kobject: 'loop2' (ffff8880a49a69a0): kobject_uevent_env kobject: 'loop2' (ffff8880a49a69a0): fill_kobj_path: path = '/devices/virtual/block/loop2' audit: type=1400 audit(1569847018.382:14660): avc: denied { map } for pid=23200 comm="syz-executor.3" path=2F6D656D66643A202864656C6574656429 dev="tmpfs" ino=85928 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:tmpfs_t:s0 tclass=file permissive=1 kobject: 'loop2' (ffff8880a49a69a0): kobject_uevent_env kobject: 'loop4' (ffff8880a4a39320): kobject_uevent_env kobject: 'loop4' (ffff8880a4a39320): fill_kobj_path: path = '/devices/virtual/block/loop4' audit: type=1400 audit(1569847018.462:14661): avc: denied { map } for pid=23211 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' (ffff8880a49a69a0): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop1' (ffff8880a494e920): kobject_uevent_env kobject: 'loop1' (ffff8880a494e920): fill_kobj_path: path = '/devices/virtual/block/loop1' audit: type=1400 audit(1569847018.542:14663): avc: denied { map } for pid=23214 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: 'loop0' (ffff888098ffd5a0): kobject_uevent_env kobject: 'loop2' (ffff8880a49a69a0): kobject_uevent_env kobject: 'loop2' (ffff8880a49a69a0): fill_kobj_path: path = '/devices/virtual/block/loop2' audit: type=1400 audit(1569847018.502:14662): avc: denied { map } for pid=23213 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: 'loop0' (ffff888098ffd5a0): fill_kobj_path: path = '/devices/virtual/block/loop0' audit: type=1400 audit(1569847018.542:14664): avc: denied { map } for pid=23213 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 audit: type=1400 audit(1569847018.552:14665): avc: denied { map } for pid=23214 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: 'loop4' (ffff8880a4a39320): kobject_uevent_env audit: type=1400 audit(1569847018.582:14666): avc: denied { map } for pid=23218 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: 'loop4' (ffff8880a4a39320): fill_kobj_path: path = '/devices/virtual/block/loop4' audit: type=1400 audit(1569847018.592:14667): avc: denied { map } for pid=23218 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: 'loop1' (ffff8880a494e920): kobject_uevent_env kobject: 'loop1' (ffff8880a494e920): fill_kobj_path: path = '/devices/virtual/block/loop1' audit: type=1400 audit(1569847018.592:14668): avc: denied { map } for pid=23218 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