WARNING: possible recursive locking detected 4.15.0-rc8+ #269 Not tainted -------------------------------------------- syz-executor7/9935 is trying to acquire lock: (&vq->mutex){+.+.}, at: [<0000000018d9de53>] vhost_dev_lock_vqs drivers/vhost/vhost.c:907 [inline] (&vq->mutex){+.+.}, at: [<0000000018d9de53>] vhost_process_iotlb_msg drivers/vhost/vhost.c:997 [inline] (&vq->mutex){+.+.}, at: [<0000000018d9de53>] vhost_chr_write_iter+0x278/0x1580 drivers/vhost/vhost.c:1046 but task is already holding lock: (&vq->mutex){+.+.}, at: [<0000000018d9de53>] vhost_dev_lock_vqs drivers/vhost/vhost.c:907 [inline] (&vq->mutex){+.+.}, at: [<0000000018d9de53>] vhost_process_iotlb_msg drivers/vhost/vhost.c:997 [inline] (&vq->mutex){+.+.}, at: [<0000000018d9de53>] 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-executor7/9935: #0: (&vq->mutex){+.+.}, at: [<0000000018d9de53>] vhost_dev_lock_vqs drivers/vhost/vhost.c:907 [inline] #0: (&vq->mutex){+.+.}, at: [<0000000018d9de53>] vhost_process_iotlb_msg drivers/vhost/vhost.c:997 [inline] #0: (&vq->mutex){+.+.}, at: [<0000000018d9de53>] vhost_chr_write_iter+0x278/0x1580 drivers/vhost/vhost.c:1046 stack backtrace: CPU: 0 PID: 9935 Comm: syz-executor7 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:00007f6693f51c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000452ee9 RDX: 0000000000000068 RSI: 00000000201c4000 RDI: 0000000000000014 RBP: 00000000000003d6 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f4cb0 R13: 00000000ffffffff R14: 00007f6693f526d4 R15: 0000000000000000 binder_alloc: binder_alloc_mmap_handler: 9965 20004000-20005000 already mapped failed -16 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=260 sclass=netlink_route_socket pig=10014 comm=syz-executor3 kauditd_printk_skb: 93 callbacks suppressed audit: type=1400 audit(1516426066.300:468): avc: denied { sys_chroot } for pid=10098 comm="syz-executor6" capability=18 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 binder: BINDER_SET_CONTEXT_MGR already set binder: 10190:10199 ioctl 40046207 0 returned -16 binder: send failed reply for transaction 28 to 10190:10193 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 audit: type=1326 audit(1516426066.661:469): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10229 comm="syz-executor5" exe="/root/syz-executor5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x0 audit: type=1326 audit(1516426066.723:470): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10229 comm="syz-executor5" exe="/root/syz-executor5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x0 audit: type=1400 audit(1516426066.779:471): avc: denied { read } for pid=10256 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=netlink_generic_socket permissive=1 QAT: Invalid ioctl QAT: Invalid ioctl kvm_pmu: event creation failed -2 binder: 10454:10463 Release 1 refcount change on invalid ref 0 ret -22 QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1400 audit(1516426067.679:472): avc: denied { map } for pid=10561 comm="syz-executor7" path="pipe:[24912]" dev="pipefs" ino=24912 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=fifo_file permissive=1 audit: type=1400 audit(1516426067.713:473): avc: denied { map } for pid=10561 comm="syz-executor7" path="/sys/kernel/debug/kcov" dev="debugfs" ino=1090 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:debugfs_t:s0 tclass=file permissive=1 audit: type=1326 audit(1516426067.740:474): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10564 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426067.740:475): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10564 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426067.792:476): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10564 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=4 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426067.793:477): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10564 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 can: request_module (can-proto-0) failed. can: request_module (can-proto-0) failed. QAT: Invalid ioctl QAT: Invalid ioctl binder: 10758:10761 ioctl c018620b 20433fe8 returned -14 binder: 10758:10761 ioctl c018620b 20433fe8 returned -14 QAT: Invalid ioctl QAT: Invalid ioctl can: request_module (can-proto-0) failed. can: request_module (can-proto-0) failed. pit: kvm: requested 5866 ns i8254 timer period limited to 500000 ns pit: kvm: requested 5866 ns i8254 timer period limited to 500000 ns dccp_invalid_packet: pskb_may_pull failed dccp_close: ABORT with 4294967275 bytes unread binder: 11657:11661 ioctl 0 2036aff8 returned -22 binder: 11657:11672 ioctl 0 2036aff8 returned -22 SELinux: unrecognized netlink message: protocol=6 nlmsg_type=90 sclass=netlink_xfrm_socket pig=11794 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=6 nlmsg_type=90 sclass=netlink_xfrm_socket pig=11802 comm=syz-executor7 binder: 11987:11989 ERROR: BC_REGISTER_LOOPER called without request binder: 11989 RLIMIT_NICE not set binder: 11987:11997 got reply transaction with bad transaction stack, transaction 36 has target 11987:0 binder: 11987:11997 transaction failed 29201/-71, size 837-0 line 2718 binder: 11989 RLIMIT_NICE not set binder: 11987:11997 ERROR: BC_REGISTER_LOOPER called without request binder: 11997 RLIMIT_NICE not set binder: 11987:11997 got reply transaction with no transaction stack binder: 11987:11997 transaction failed 29201/-71, size 837-0 line 2703 binder: release 11987:11989 transaction 39 out, still active binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 39, target dead binder: release 11987:11989 transaction 36 in, still active binder: send failed reply for transaction 36 to 11987:11997 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29189 QAT: Invalid ioctl QAT: Invalid ioctl binder: 12248:12254 got new transaction with bad transaction stack, transaction 42 has target 12248:0 binder: 12248:12254 transaction failed 29201/-71, size 0-0 line 2815 binder: BINDER_SET_CONTEXT_MGR already set binder: 12248:12254 ioctl 40046207 0 returned -16 binder_alloc: 12248: binder_alloc_buf, no vma binder: 12248:12281 transaction failed 29189/-3, size 0-0 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 12248:12254 transaction 42 out, still active binder: undelivered TRANSACTION_COMPLETE kvm: emulating exchange as write binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 42, target dead kauditd_printk_skb: 133 callbacks suppressed audit: type=1326 audit(1516426073.653:611): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=12312 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426073.690:612): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=12312 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=191 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426073.697:613): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=12312 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426073.697:614): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=12312 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=292 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426073.698:615): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=12312 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426073.698:616): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=12312 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=53 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426073.707:617): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=12312 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426073.707:618): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=12312 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426073.708:619): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=12312 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=42 compat=0 ip=0x452ee9 code=0x7ffc0000 audit: type=1326 audit(1516426073.709:620): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=12312 comm="syz-executor7" exe="/root/syz-executor7" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452ee9 code=0x7ffc0000 binder: 12628:12636 ERROR: BC_REGISTER_LOOPER called without request binder: 12636 RLIMIT_NICE not set binder_alloc: 12628: binder_alloc_buf, no vma binder: 12628:12648 transaction failed 29189/-3, size 0-0 line 2903 binder: BINDER_SET_CONTEXT_MGR already set binder: 12628:12655 ERROR: BC_REGISTER_LOOPER called without request binder: 12655 RLIMIT_NICE not set binder: 12628:12648 ioctl 40046207 0 returned -16 binder: undelivered TRANSACTION_ERROR: 29189