============================================ WARNING: possible recursive locking detected 4.15.0-rc8+ #269 Not tainted -------------------------------------------- syz-executor5/5201 is trying to acquire lock: (&vq->mutex){+.+.}, at: [<00000000e98cf6b4>] vhost_dev_lock_vqs drivers/vhost/vhost.c:907 [inline] (&vq->mutex){+.+.}, at: [<00000000e98cf6b4>] vhost_process_iotlb_msg drivers/vhost/vhost.c:997 [inline] (&vq->mutex){+.+.}, at: [<00000000e98cf6b4>] vhost_chr_write_iter+0x278/0x1580 drivers/vhost/vhost.c:1046 but task is already holding lock: (&vq->mutex){+.+.}, at: [<00000000e98cf6b4>] vhost_dev_lock_vqs drivers/vhost/vhost.c:907 [inline] (&vq->mutex){+.+.}, at: [<00000000e98cf6b4>] vhost_process_iotlb_msg drivers/vhost/vhost.c:997 [inline] (&vq->mutex){+.+.}, at: [<00000000e98cf6b4>] vhost_chr_write_iter+0x278/0x1580 drivers/vhost/vhost.c:1046 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vq->mutex); lock(&vq->mutex); *** DEADLOCK *** May be due to missing lock nesting notation 1 lock held by syz-executor5/5201: #0: (&vq->mutex){+.+.}, at: [<00000000e98cf6b4>] vhost_dev_lock_vqs drivers/vhost/vhost.c:907 [inline] #0: (&vq->mutex){+.+.}, at: [<00000000e98cf6b4>] vhost_process_iotlb_msg drivers/vhost/vhost.c:997 [inline] #0: (&vq->mutex){+.+.}, at: [<00000000e98cf6b4>] vhost_chr_write_iter+0x278/0x1580 drivers/vhost/vhost.c:1046 stack backtrace: CPU: 0 PID: 5201 Comm: syz-executor5 Not tainted 4.15.0-rc8+ #269 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+0x194/0x257 lib/dump_stack.c:53 print_deadlock_bug kernel/locking/lockdep.c:1756 [inline] check_deadlock kernel/locking/lockdep.c:1800 [inline] validate_chain kernel/locking/lockdep.c:2396 [inline] __lock_acquire+0xe8f/0x3e00 kernel/locking/lockdep.c:3426 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3914 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1a80 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 vhost_dev_lock_vqs drivers/vhost/vhost.c:907 [inline] vhost_process_iotlb_msg drivers/vhost/vhost.c:997 [inline] vhost_chr_write_iter+0x278/0x1580 drivers/vhost/vhost.c:1046 vhost_net_chr_write_iter+0x59/0x70 drivers/vhost/net.c:1353 call_write_iter include/linux/fs.h:1772 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x684/0x970 fs/read_write.c:482 vfs_write+0x189/0x510 fs/read_write.c:544 SYSC_write fs/read_write.c:589 [inline] SyS_write+0xef/0x220 fs/read_write.c:581 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x452ee9 RSP: 002b:00007f58fa023c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f58fa024700 RCX: 0000000000452ee9 RDX: 0000000000000068 RSI: 0000000020977f98 RDI: 0000000000000013 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 0000000000000000 R13: 0000000000a2f7cf R14: 00007f58fa0249c0 R15: 0000000000000000 capability: warning: `syz-executor2' uses deprecated v2 capabilities in a way that may be insecure binder: 5355:5361 got transaction with invalid handle, 0 binder: 5355:5361 transaction failed 29201/-22, size 24-8 line 2995 binder_alloc: binder_alloc_mmap_handler: 5355 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 5355:5361 ioctl 40046207 0 returned -16 binder_alloc: 5355: binder_alloc_buf, no vma binder: 5355:5375 transaction failed 29189/-3, size 24-8 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 netlink: 468 bytes leftover after parsing attributes in process `syz-executor0'. SELinux: policydb string length -433 does not match expected length 8 SELinux: failed to load policy syz-executor1 uses obsolete (PF_INET,SOCK_PACKET) RDS: rds_bind could not find a transport for 0.0.255.255, load rds_tcp or rds_rdma? RDS: rds_bind could not find a transport for 0.0.255.255, load rds_tcp or rds_rdma? dccp_close: ABORT with 4294967275 bytes unread mmap: syz-executor7 (5708) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. xprt_adjust_timeout: rq_timeout = 0! xprt_adjust_timeout: rq_timeout = 0! binder_alloc: binder_alloc_mmap_handler: 5971 20000000-20002000 already mapped failed -16 print_req_error: I/O error, dev loop0, sector 896 Buffer I/O error on dev loop0, logical block 112, lost async page write handle_userfault: 99 callbacks suppressed FAULT_FLAG_ALLOW_RETRY missing 30 CPU: 0 PID: 6058 Comm: syz-executor0 Not tainted 4.15.0-rc8+ #269 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+0x194/0x257 lib/dump_stack.c:53 handle_userfault+0x12fa/0x24c0 fs/userfaultfd.c:427 do_anonymous_page mm/memory.c:3127 [inline] handle_pte_fault mm/memory.c:3941 [inline] __handle_mm_fault+0x32a3/0x3ce0 mm/memory.c:4067 handle_mm_fault+0x334/0x8d0 mm/memory.c:4104 __do_page_fault+0x5c9/0xc90 arch/x86/mm/fault.c:1430 do_page_fault+0xee/0x720 arch/x86/mm/fault.c:1505 page_fault+0x2c/0x60 arch/x86/entry/entry_64.S:1260 RIP: 0010:fault_in_pages_readable include/linux/pagemap.h:601 [inline] RIP: 0010:iov_iter_fault_in_readable+0x1a7/0x410 lib/iov_iter.c:421 RSP: 0018:ffff8801cf74f928 EFLAGS: 00010246 RAX: 0000000000010000 RBX: 0000000020011fd2 RCX: ffffffff82587fc1 RDX: 00000000000000ff RSI: ffffc900018a7000 RDI: ffff8801cf74fd28 RBP: ffff8801cf74fa08 R08: 0000000000000000 R09: 1ffff10039ee9ee7 R10: ffff8801cf74f858 R11: ffff8801d52efc00 R12: 1ffff10039ee9f28 R13: ffff8801cf74f9e0 R14: 0000000000000000 R15: ffff8801cf74fd20 generic_perform_write+0x200/0x600 mm/filemap.c:3129 __generic_file_write_iter+0x366/0x5b0 mm/filemap.c:3264 generic_file_write_iter+0x399/0x790 mm/filemap.c:3292 call_write_iter include/linux/fs.h:1772 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x684/0x970 fs/read_write.c:482 vfs_write+0x189/0x510 fs/read_write.c:544 SYSC_write fs/read_write.c:589 [inline] SyS_write+0xef/0x220 fs/read_write.c:581 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x452ee9 RSP: 002b:00007f07b9aaac58 EFLAGS: 00000212 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000452ee9 RDX: 0000000000000030 RSI: 0000000020011fd2 RDI: 0000000000000015 RBP: 000000000000060f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f8208 R13: 00000000ffffffff R14: 00007f07b9aab6d4 R15: 0000000000000000 audit: type=1400 audit(1516426250.700:129): avc: denied { prog_run } for pid=6121 comm="syz-executor7" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 PPPIOCDETACH file->f_count=2 audit: type=1326 audit(1516426250.701:130): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6120 comm="syz-executor2" exe="/root/syz-executor2" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426250.728:132): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6118 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426250.728:133): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6118 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426250.729:134): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6118 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=105 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426250.730:135): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6118 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426250.730:136): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6118 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426250.731:137): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6118 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=257 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426250.731:138): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6118 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 binder: 6568:6570 transaction failed 29189/-22, size 0-0 line 2788 binder: 6568:6570 transaction failed 29189/-22, size 0-0 line 2788 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 semctl(GETNCNT/GETZCNT) is since 3.16 Single Unix Specification compliant. The task syz-executor2 (6594) triggered the difference, watch for misbehavior. binder: 6772:6779 not enough space to store 10 fds in buffer binder: 6772:6779 transaction failed 29201/-22, size 72-16 line 3045 binder: BINDER_SET_CONTEXT_MGR already set binder_alloc: 6772: binder_alloc_buf, no vma binder: 6772:6779 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 6813:6819 ioctl 40046207 0 returned -16 binder: 6813:6819 ERROR: BC_REGISTER_LOOPER called without request binder: 6813:6828 got reply transaction with no transaction stack binder: 6813:6828 transaction failed 29201/-71, size 0-16 line 2703 binder_alloc: binder_alloc_mmap_handler: 6813 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 6813:6828 ioctl 40046207 0 returned -16 binder: 6813:6843 ERROR: BC_REGISTER_LOOPER called without request binder: 6843 RLIMIT_NICE not set binder: 6813:6850 got reply transaction with no transaction stack binder: 6813:6850 transaction failed 29201/-71, size 0-16 line 2703 binder: 6772:6798 transaction failed 29189/-3, size 72-16 line 2903 binder_alloc: 6772: binder_alloc_buf, no vma binder: 6813:6819 transaction failed 29189/-3, size 0-0 line 2903 binder_alloc: 6772: binder_alloc_buf, no vma binder: 6813:6828 transaction failed 29189/-3, size 0-0 line 2903 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl binder: 7042:7047 ioctl 8919 2056f000 returned -22 binder: 7047 RLIMIT_NICE not set binder: 7047 RLIMIT_NICE not set binder: 7042:7072 BC_FREE_BUFFER u0000000020000000 matched unreturned buffer binder: 7042:7072 got new transaction with bad transaction stack, transaction 19 has target 7042:0 binder: 7042:7072 transaction failed 29201/-71, size 0-0 line 2815 binder: 7042:7072 ioctl 8919 2056f000 returned -22 binder: 7089 RLIMIT_NICE not set binder: BINDER_SET_CONTEXT_MGR already set binder: 7042:7072 ioctl 40046207 0 returned -16 binder_alloc: 7042: binder_alloc_buf, no vma binder: 7042:7095 transaction failed 29189/-3, size 0-0 line 2903 binder: 7042:7072 BC_FREE_BUFFER u0000000020000000 no match binder_alloc: 7042: binder_alloc_buf, no vma binder: 7042:7072 transaction failed 29189/-3, size 0-0 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 7042:7047 transaction 19 in, still active binder: send failed reply for transaction 19 to 7042:7072 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29189 binder: 7236:7244 transaction failed 29189/-22, size 0-8679965255895708463 line 2788 TCP: request_sock_TCP: Possible SYN flooding on port 20022. Sending cookies. Check SNMP counters. binder: BINDER_SET_CONTEXT_MGR already set binder: 7236:7254 ioctl 40046207 0 returned -16 binder: undelivered TRANSACTION_ERROR: 29189 TCP: request_sock_TCP: Possible SYN flooding on port 20010. Sending cookies. Check SNMP counters. QAT: Invalid ioctl QAT: Invalid ioctl binder_alloc: binder_alloc_mmap_handler: 7456 2011a000-2051a000 already mapped failed -16 kauditd_printk_skb: 202 callbacks suppressed audit: type=1326 audit(1516426256.178:340): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7482 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426256.180:341): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7482 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=72 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426256.180:342): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7482 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000