BUG: sleeping function called from invalid context at ./include/linux/uaccess.h:71 in_atomic(): 1, irqs_disabled(): 0, pid: 10494, name: syz-executor4 2 locks held by syz-executor4/10494: #0: (&vcpu->mutex){+.+.}, at: [] vcpu_load+0x1c/0x70 arch/x86/kvm/../../../virt/kvm/kvm_main.c:154 #1: (&kvm->srcu){....}, at: [] vcpu_enter_guest arch/x86/kvm/x86.c:7023 [inline] #1: (&kvm->srcu){....}, at: [] vcpu_run arch/x86/kvm/x86.c:7102 [inline] #1: (&kvm->srcu){....}, at: [] kvm_arch_vcpu_ioctl_run+0x1bdd/0x5a30 arch/x86/kvm/x86.c:7263 CPU: 1 PID: 10494 Comm: syz-executor4 Not tainted 4.13.0-rc6-next-20170825+ #9 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 ___might_sleep+0x2b2/0x470 kernel/sched/core.c:6022 __might_sleep+0x95/0x190 kernel/sched/core.c:5975 __might_fault+0xab/0x1d0 mm/memory.c:4483 __copy_from_user include/linux/uaccess.h:71 [inline] paging32_walk_addr_generic+0x427/0x1e10 arch/x86/kvm/paging_tmpl.h:369 paging32_walk_addr arch/x86/kvm/paging_tmpl.h:475 [inline] paging32_gva_to_gpa+0xa5/0x230 arch/x86/kvm/paging_tmpl.h:913 kvm_read_guest_virt_helper+0xd8/0x140 arch/x86/kvm/x86.c:4427 kvm_read_guest_virt_system+0x3c/0x50 arch/x86/kvm/x86.c:4494 segmented_read_std+0x10c/0x180 arch/x86/kvm/emulate.c:822 em_fxrstor+0x27b/0x410 arch/x86/kvm/emulate.c:4025 x86_emulate_insn+0x55d/0x3cf0 arch/x86/kvm/emulate.c:5483 x86_emulate_instruction+0x411/0x1ca0 arch/x86/kvm/x86.c:5726 kvm_mmu_page_fault+0x1b0/0x2f0 arch/x86/kvm/mmu.c:4932 handle_ept_violation+0x194/0x540 arch/x86/kvm/vmx.c:6509 vmx_handle_exit+0x24b/0x1a60 arch/x86/kvm/vmx.c:8830 vcpu_enter_guest arch/x86/kvm/x86.c:7040 [inline] vcpu_run arch/x86/kvm/x86.c:7102 [inline] kvm_arch_vcpu_ioctl_run+0x1d36/0x5a30 arch/x86/kvm/x86.c:7263 kvm_vcpu_ioctl+0x64c/0x1010 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2592 vfs_ioctl fs/ioctl.c:45 [inline] do_vfs_ioctl+0x1b1/0x1530 fs/ioctl.c:685 SYSC_ioctl fs/ioctl.c:700 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x446749 RSP: 002b:00007f637b198c08 EFLAGS: 00000282 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000019 RCX: 0000000000446749 RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000019 RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000009120 R13: 000000002aaaaaab R14: 00000000006e7690 R15: 0000000000000019 QAT: Invalid ioctl QAT: Invalid ioctl SELinux: unrecognized netlink message: protocol=4 nlmsg_type=24 sclass=netlink_tcpdiag_socket pig=10586 comm=syz-executor4 SELinux: unrecognized netlink message: protocol=4 nlmsg_type=24 sclass=netlink_tcpdiag_socket pig=10593 comm=syz-executor4 netlink: 13 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 13 bytes leftover after parsing attributes in process `syz-executor2'. audit: type=1326 audit(1503862864.655:38): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=10623 comm="syz-executor1" exe="/syz-executor1" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 SELinux: unrecognized netlink message: protocol=9 nlmsg_type=0 sclass=netlink_audit_socket pig=10629 comm=syz-executor0 SELinux: unrecognized netlink message: protocol=9 nlmsg_type=0 sclass=netlink_audit_socket pig=10629 comm=syz-executor0 NFS: bad mount option value specified: v; audit: type=1326 audit(1503862864.722:39): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=10623 comm="syz-executor1" exe="/syz-executor1" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 NFS: bad mount option value specified: v; selinux_nlmsg_perm: 1 callbacks suppressed SELinux: unrecognized netlink message: protocol=0 nlmsg_type=14606 sclass=netlink_route_socket pig=10754 comm=syz-executor5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=14606 sclass=netlink_route_socket pig=10768 comm=syz-executor5 QAT: Invalid ioctl QAT: Invalid ioctl netlink: 11 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 11 bytes leftover after parsing attributes in process `syz-executor2'. kvm_hv_set_msr: 129 callbacks suppressed kvm [10894]: vcpu2, guest rIP: 0x9115 Hyper-V uhandled wrmsr: 0x4000008f data 0x0 kvm [10894]: vcpu2, guest rIP: 0x9115 Hyper-V uhandled wrmsr: 0x4000008e data 0x0 kvm [10894]: vcpu2, guest rIP: 0x9115 Hyper-V uhandled wrmsr: 0x4000008d data 0x0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10938 comm=syz-executor5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10938 comm=syz-executor5 kvm [10894]: vcpu2, guest rIP: 0x9115 Hyper-V uhandled wrmsr: 0x4000008c data 0x0 kvm [10894]: vcpu2, guest rIP: 0x9115 Hyper-V uhandled wrmsr: 0x4000008b data 0x0 kvm [10894]: vcpu2, guest rIP: 0x9115 Hyper-V uhandled wrmsr: 0x4000008a data 0x0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10938 comm=syz-executor5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10938 comm=syz-executor5 audit: type=1326 audit(1503862865.386:40): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=10941 comm="syz-executor6" exe="/syz-executor6" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 netlink: 1 bytes leftover after parsing attributes in process `syz-executor2'. sd 0:0:0:0: [sg0] tag#0 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK sd 0:0:0:0: [sg0] tag#0 CDB: Test Unit Ready sd 0:0:0:0: [sg0] tag#0 CDB[00]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sd 0:0:0:0: [sg0] tag#0 CDB[10]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sd 0:0:0:0: [sg0] tag#0 CDB[20]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sd 0:0:0:0: [sg0] tag#0 CDB[30]: 00 00 00 00 00 00 00 00 00 00 00 00 QAT: Invalid ioctl netlink: 1 bytes leftover after parsing attributes in process `syz-executor2'. audit: type=1326 audit(1503862865.586:41): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=10941 comm="syz-executor6" exe="/syz-executor6" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 sd 0:0:0:0: [sg0] tag#0 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK sd 0:0:0:0: [sg0] tag#0 CDB: Test Unit Ready sd 0:0:0:0: [sg0] tag#0 CDB[00]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sd 0:0:0:0: [sg0] tag#0 CDB[10]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sd 0:0:0:0: [sg0] tag#0 CDB[20]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sd 0:0:0:0: [sg0] tag#0 CDB[30]: 00 00 00 00 00 00 00 00 00 00 00 00 QAT: Invalid ioctl netlink: 3 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor2'. Can not set IPV6_FL_F_REFLECT if flowlabel_consistency sysctl is enable Can not set IPV6_FL_F_REFLECT if flowlabel_consistency sysctl is enable syz-executor0 (11225) used greatest stack depth: 15720 bytes left device lo entered promiscuous mode rpcbind: RPC call returned error 22 rpcbind: RPC call returned error 22 sctp: [Deprecated]: syz-executor6 (pid 11416) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor6 (pid 11424) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sg_write: data in/out 3171656/194 bytes for SCSI command 0x2a-- guessing data in; program syz-executor2 not setting count and/or reply_len properly sg_write: data in/out 3171656/194 bytes for SCSI command 0x2a-- guessing data in; program syz-executor2 not setting count and/or reply_len properly audit: type=1326 audit(1503862866.936:42): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=11529 comm="syz-executor7" exe="/syz-executor7" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 sock: sock_set_timeout: `syz-executor3' (pid 11570) tries to set negative timeout audit: type=1326 audit(1503862867.016:43): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=11529 comm="syz-executor7" exe="/syz-executor7" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 audit: type=1326 audit(1503862867.125:44): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=11593 comm="syz-executor3" exe="/syz-executor3" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 audit: type=1326 audit(1503862867.210:45): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=11593 comm="syz-executor3" exe="/syz-executor3" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl TCP: request_sock_TCP: Possible SYN flooding on port 20012. Sending cookies. Check SNMP counters. QAT: Invalid ioctl device lo left promiscuous mode TCP: request_sock_TCPv6: Possible SYN flooding on port 20020. Sending cookies. Check SNMP counters. SELinux: unrecognized netlink message: protocol=6 nlmsg_type=65535 sclass=netlink_xfrm_socket pig=11862 comm=syz-executor2 *** Guest State *** CR0: actual=0x0000000000000031, shadow=0x0000000060000011, gh_mask=fffffffffffffff7 CR4: actual=0x0000000000002050, shadow=0x0000000000000000, gh_mask=ffffffffffffe871 CR3 = 0x00000000fffbc000 RSP = 0x0000000000000f80 RIP = 0x0000000000000000 RFLAGS=0x003cf702 DR7 = 0x0000000000000400 Sysenter RSP=0000000000000f80 CS:RIP=0030:0000000000002810 CS: sel=0x0030, attr=0x0409b, limit=0x000fffff, base=0x0000000000000000 DS: sel=0x0038, attr=0x04093, limit=0x000fffff, base=0x0000000000000000 SS: sel=0x0038, attr=0x04093, limit=0x000fffff, base=0x0000000000000000 ES: sel=0x0038, attr=0x04093, limit=0x000fffff, base=0x0000000000000000 FS: sel=0x0038, attr=0x04093, limit=0x000fffff, base=0x0000000000000000 GS: sel=0x0038, attr=0x04093, limit=0x000fffff, base=0x0000000000000000 GDTR: limit=0x000007ff, base=0x0000000000001000 LDTR: sel=0x0008, attr=0x04082, limit=0x000007ff, base=0x0000000000001800 IDTR: limit=0x000001ff, base=0x0000000000003800 TR: sel=0x0000, attr=0x0008b, limit=0x0000ffff, base=0x0000000000000000 EFER = 0x0000000000000001 PAT = 0x0007040600070406 DebugCtl = 0x0000000000000000 DebugExceptions = 0x0000000000000000 BndCfgS = 0x0000000000000000 Interruptibility = 00000000 ActivityState = 00000000 *** Host State *** RIP = 0xffffffff811b8fd7 RSP = 0xffff8800398bf4c8 CS=0010 SS=0018 DS=0000 ES=0000 FS=0000 GS=0000 TR=0040 FSBase=00007f9e20ea4700 GSBase=ffff88003ec00000 TRBase=ffff88003ec23100 GDTBase=ffffffffff577000 IDTBase=ffffffffff57b000 CR0=0000000080050033 CR3=0000000036ea0000 CR4=00000000000026f0 Sysenter RSP=0000000000000000 CS:RIP=0010:ffffffff84da5a70 EFER = 0x0000000000000d01 PAT = 0x0007040600070406 *** Control State *** PinBased=0000007f CPUBased=b6a1edfa SecondaryExec=000000e3 EntryControls=0001d1ff ExitControls=00afefff ExceptionBitmap=00060042 PFECmask=00000000 PFECmatch=00000000 VMEntry: intr_info=800000fc errcode=00000000 ilen=00000000 VMExit: intr_info=00000000 errcode=00000000 ilen=00000000 reason=80000021 qualification=0000000000000000 IDTVectoring: info=00000000 errcode=00000000 TSC Offset = 0xffffffce73db904e TPR Threshold = 0x00 EPT pointer = 0x00000000579aa01e Virtual processor ID = 0x00cb QAT: Invalid ioctl SELinux: unrecognized netlink message: protocol=6 nlmsg_type=65535 sclass=netlink_xfrm_socket pig=11862 comm=syz-executor2 QAT: Invalid ioctl ata1.00: invalid multi_count 64 ignored ata1.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x0 ata1.00: failed command: WRITE MULTIPLE FUA EXT ata1.00: cmd ce/07:00:00:00:03/00:00:00:00:00/09 tag 0 ncq nodata 188 out res 50/00:00:18:25:00/00:00:18:25:00/a0 Emask 0x40 (internal error) ata1.00: status: { DRDY } ata1.00: ATA Identify Device Log not supported ata1.00: Security Log not supported ata1.00: ATA Identify Device Log not supported ata1.00: Security Log not supported ata1.00: configured for MWDMA2 ata1: EH complete ata1.00: invalid multi_count 64 ignored ata1.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x0 ata1.00: failed command: WRITE MULTIPLE FUA EXT ata1.00: cmd ce/07:00:00:00:03/00:00:00:00:00/09 tag 0 ncq nodata 188 out res 41/04:01:00:00:00/04:01:00:00:00/a0 Emask 0x41 (internal error) ata1.00: status: { DRDY ERR } ata1.00: error: { ABRT } ata1.00: ATA Identify Device Log not supported ata1.00: Security Log not supported ata1.00: ATA Identify Device Log not supported ata1.00: Security Log not supported ata1.00: configured for MWDMA2 ata1: EH complete IPv6: Can't replace route, no match found IPv6: Can't replace route, no match found SELinux: unrecognized netlink message: protocol=0 nlmsg_type=14917 sclass=netlink_route_socket pig=12152 comm=syz-executor1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=14917 sclass=netlink_route_socket pig=12162 comm=syz-executor1 QAT: Invalid ioctl QAT: Invalid ioctl sg_write: data in/out 213971796/76 bytes for SCSI command 0x0-- guessing data in; program syz-executor4 not setting count and/or reply_len properly sg_write: data in/out 1785953271/165 bytes for SCSI command 0xc0-- guessing data in; program syz-executor4 not setting count and/or reply_len properly sg_write: data in/out 213971796/76 bytes for SCSI command 0x0-- guessing data in; program syz-executor4 not setting count and/or reply_len properly audit: type=1326 audit(1503862868.282:46): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=12236 comm="syz-executor5" exe="/syz-executor5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 device lo entered promiscuous mode audit: type=1326 audit(1503862868.325:47): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=12253 comm="syz-executor7" exe="/syz-executor7" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 audit: type=1326 audit(1503862868.350:48): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=12236 comm="syz-executor5" exe="/syz-executor5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000