irq bypass consumer (token ffff8801d4c59cc0) registration fails: -16 ====================================================== WARNING: possible circular locking dependency detected 4.13.0-rc6-next-20170825+ #9 Not tainted ------------------------------------------------------ kworker/0:1/23 is trying to acquire lock: (&kvm->irqfds.resampler_lock){+.+.}, at: [] irqfd_resampler_shutdown+0xe3/0x6b0 arch/x86/kvm/../../../virt/kvm/eventfd.c:98 but task is already holding lock: ((&irqfd->shutdown)){+.+.}, at: [] process_one_work+0xb2c/0x1be0 kernel/workqueue.c:2094 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 ((&irqfd->shutdown)){+.+.}: process_one_work+0xba5/0x1be0 kernel/workqueue.c:2095 worker_thread+0x223/0x1860 kernel/workqueue.c:2233 kthread+0x39c/0x470 kernel/kthread.c:231 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 0xffffffffffffffff -> #1 ((complete)&rcu.completion){+.+.}: check_prevs_add kernel/locking/lockdep.c:2020 [inline] validate_chain kernel/locking/lockdep.c:2469 [inline] __lock_acquire+0x3286/0x4620 kernel/locking/lockdep.c:3498 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4002 complete_acquire include/linux/completion.h:39 [inline] __wait_for_common kernel/sched/completion.c:108 [inline] wait_for_common kernel/sched/completion.c:122 [inline] wait_for_completion+0xc8/0x770 kernel/sched/completion.c:143 __synchronize_srcu+0x1b5/0x250 kernel/rcu/srcutree.c:898 synchronize_srcu_expedited kernel/rcu/srcutree.c:923 [inline] synchronize_srcu+0x1a3/0x560 kernel/rcu/srcutree.c:974 kvm_irqfd_assign arch/x86/kvm/../../../virt/kvm/eventfd.c:364 [inline] kvm_irqfd+0x994/0x1d50 arch/x86/kvm/../../../virt/kvm/eventfd.c:572 kvm_vm_ioctl+0x1079/0x1c40 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3032 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 -> #0 (&kvm->irqfds.resampler_lock){+.+.}: check_prev_add+0x865/0x1520 kernel/locking/lockdep.c:1894 check_prevs_add kernel/locking/lockdep.c:2020 [inline] validate_chain kernel/locking/lockdep.c:2469 [inline] __lock_acquire+0x3286/0x4620 kernel/locking/lockdep.c:3498 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4002 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1870 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 irqfd_resampler_shutdown+0xe3/0x6b0 arch/x86/kvm/../../../virt/kvm/eventfd.c:98 irqfd_shutdown+0xd8/0x1a0 arch/x86/kvm/../../../virt/kvm/eventfd.c:137 process_one_work+0xbfd/0x1be0 kernel/workqueue.c:2098 worker_thread+0x223/0x1860 kernel/workqueue.c:2233 kthread+0x39c/0x470 kernel/kthread.c:231 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 other info that might help us debug this: Chain exists of: &kvm->irqfds.resampler_lock --> (complete)&rcu.completion --> (&irqfd->shutdown) Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((&irqfd->shutdown)); lock((complete)&rcu.completion); lock((&irqfd->shutdown)); lock(&kvm->irqfds.resampler_lock); *** DEADLOCK *** 2 locks held by kworker/0:1/23: #0: ("kvm-irqfd-cleanup"){++++}, at: [] __write_once_size include/linux/compiler.h:305 [inline] #0: ("kvm-irqfd-cleanup"){++++}, at: [] atomic64_set arch/x86/include/asm/atomic64_64.h:33 [inline] #0: ("kvm-irqfd-cleanup"){++++}, at: [] atomic_long_set include/asm-generic/atomic-long.h:56 [inline] #0: ("kvm-irqfd-cleanup"){++++}, at: [] set_work_data kernel/workqueue.c:617 [inline] #0: ("kvm-irqfd-cleanup"){++++}, at: [] set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline] #0: ("kvm-irqfd-cleanup"){++++}, at: [] process_one_work+0xad4/0x1be0 kernel/workqueue.c:2090 #1: ((&irqfd->shutdown)){+.+.}, at: [] process_one_work+0xb2c/0x1be0 kernel/workqueue.c:2094 stack backtrace: CPU: 0 PID: 23 Comm: kworker/0:1 Not tainted 4.13.0-rc6-next-20170825+ #9 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: kvm-irqfd-cleanup irqfd_shutdown Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 print_circular_bug+0x503/0x710 kernel/locking/lockdep.c:1259 check_prev_add+0x865/0x1520 kernel/locking/lockdep.c:1894 check_prevs_add kernel/locking/lockdep.c:2020 [inline] validate_chain kernel/locking/lockdep.c:2469 [inline] __lock_acquire+0x3286/0x4620 kernel/locking/lockdep.c:3498 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4002 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1870 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 irqfd_resampler_shutdown+0xe3/0x6b0 arch/x86/kvm/../../../virt/kvm/eventfd.c:98 irqfd_shutdown+0xd8/0x1a0 arch/x86/kvm/../../../virt/kvm/eventfd.c:137 process_one_work+0xbfd/0x1be0 kernel/workqueue.c:2098 worker_thread+0x223/0x1860 kernel/workqueue.c:2233 kthread+0x39c/0x470 kernel/kthread.c:231 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 netlink: 5 bytes leftover after parsing attributes in process `syz-executor5'. sctp: [Deprecated]: syz-executor7 (pid 4575) Use of int in max_burst socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor7 (pid 4581) Use of int in max_burst socket option. Use struct sctp_assoc_value instead tmpfs: Bad mount option „냎ø tmpfs: Bad mount option „냎ø sock: sock_set_timeout: `syz-executor1' (pid 4693) tries to set negative timeout netlink: 13 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 13 bytes leftover after parsing attributes in process `syz-executor6'. device lo entered promiscuous mode sock: sock_set_timeout: `syz-executor1' (pid 4698) tries to set negative timeout sctp: [Deprecated]: syz-executor6 (pid 4726) Use of int in max_burst socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor6 (pid 4748) Use of int in max_burst socket option. Use struct sctp_assoc_value instead audit: type=1326 audit(1503689729.692:8): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=4753 comm="syz-executor1" exe="/root/syz-executor1" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0xffff0000 audit: type=1326 audit(1503689729.738:9): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=4753 comm="syz-executor1" exe="/root/syz-executor1" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0xffff0000 netlink: 5 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor5'. program syz-executor1 is using a deprecated SCSI ioctl, please convert it to SG_IO program syz-executor1 is using a deprecated SCSI ioctl, please convert it to SG_IO sd 0:0:1:0: ioctl_internal_command: ILLEGAL REQUEST asc=0x20 ascq=0x0 program syz-executor1 is using a deprecated SCSI ioctl, please convert it to SG_IO sd 0:0:1:0: ioctl_internal_command: ILLEGAL REQUEST asc=0x20 ascq=0x0 program syz-executor1 is using a deprecated SCSI ioctl, please convert it to SG_IO sd 0:0:1:0: ioctl_internal_command: ILLEGAL REQUEST asc=0x20 ascq=0x0 sd 0:0:1:0: ioctl_internal_command: ILLEGAL REQUEST asc=0x20 ascq=0x0 sock: sock_set_timeout: `syz-executor0' (pid 4886) tries to set negative timeout audit: type=1326 audit(1503689731.420:10): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=4879 comm="syz-executor0" exe="/root/syz-executor0" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0x0 sock: sock_set_timeout: `syz-executor0' (pid 4914) tries to set negative timeout audit: type=1326 audit(1503689731.552:11): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=4879 comm="syz-executor0" exe="/root/syz-executor0" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0x0 rpcbind: RPC call returned error 22 rpcbind: RPC call returned error 22 sctp: [Deprecated]: syz-executor3 (pid 4951) Use of int in maxseg socket option. Use struct sctp_assoc_value instead rfkill: input handler disabled rfkill: input handler enabled sctp: [Deprecated]: syz-executor3 (pid 4965) Use of int in maxseg socket option. Use struct sctp_assoc_value instead TCP: request_sock_TCP: Possible SYN flooding on port 20016. Sending cookies. Check SNMP counters. netlink: 8 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor3'. QAT: Invalid ioctl audit: type=1326 audit(1503689732.191:12): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5070 comm="syz-executor4" exe="/root/syz-executor4" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0xffff0000 sctp: [Deprecated]: syz-executor2 (pid 5091) Use of int in max_burst socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor2 (pid 5091) Use of int in max_burst socket option. Use struct sctp_assoc_value instead QAT: Invalid ioctl ICMPv6: NA: someone advertises our address fe80:0000:0000:0000:0000:0000:0000:01aa on syz1! QAT: Invalid ioctl sg_write: data in/out 1473841115/4058 bytes for SCSI command 0x33-- guessing data in; program syz-executor5 not setting count and/or reply_len properly sg_write: data in/out 1473841115/4058 bytes for SCSI command 0x33-- guessing data in; program syz-executor5 not setting count and/or reply_len properly QAT: Invalid ioctl audit: type=1326 audit(1503689732.988:13): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5310 comm="syz-executor2" exe="/root/syz-executor2" sig=9 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0x0 QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1326 audit(1503689733.096:14): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5310 comm="syz-executor2" exe="/root/syz-executor2" sig=9 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0x0 audit: type=1326 audit(1503689733.153:15): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5352 comm="syz-executor6" exe="/root/syz-executor6" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0x0 netlink: 1 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor4'. audit: type=1326 audit(1503689733.295:16): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5352 comm="syz-executor6" exe="/root/syz-executor6" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0x0 QAT: Invalid ioctl audit: type=1326 audit(1503689733.409:17): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5425 comm="syz-executor5" exe="/root/syz-executor5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0xffff0000 *** Guest State *** SELinux: unrecognized netlink message: protocol=0 nlmsg_type=44980 sclass=netlink_route_socket pig=5436 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=44980 sclass=netlink_route_socket pig=5436 comm=syz-executor7 CR0: actual=0x0000000080000031, shadow=0x0000000060000011, gh_mask=fffffffffffffff7 CR4: actual=0x0000000000002050, shadow=0x0000000000000010, gh_mask=ffffffffffffe871 CR3 = 0x00000000fffbc000 RSP = 0x0000000000000f80 RIP = 0x0000000000000000 QAT: Invalid ioctl audit: type=1326 audit(1503689733.536:18): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5425 comm="syz-executor5" exe="/root/syz-executor5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0xffff0000 *** Guest State *** CR0: actual=0x0000000080000031, shadow=0x0000000060000011, gh_mask=fffffffffffffff7 CR4: actual=0x0000000000002050, shadow=0x0000000000000020, gh_mask=ffffffffffffe871 CR3 = 0x00000000fffbc000 RSP = 0x0000000000000f80 RIP = 0x0000000000000000 RFLAGS=0x00000002 DR7 = 0x0000000000000400 Sysenter RSP=0000000000000f80 CS:RIP=0050: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 Interruptibility = 00000000 ActivityState = 00000000 *** Host State *** RIP = 0xffffffff811b8fd7 RSP = 0xffff8801c250f4c8 CS=0010 SS=0018 DS=0000 ES=0000 FS=0000 GS=0000 TR=0040 FSBase=00007f68949c5700 GSBase=ffff8801db300000 TRBase=ffff8801db323100 GDTBase=ffffffffff576000 IDTBase=ffffffffff57b000 CR0=0000000080050033 CR3=00000001cb298000 CR4=00000000001426e0 Sysenter RSP=0000000000000000 CS:RIP=0010:ffffffff84da5a60 EFER = 0x0000000000000d01 PAT = 0x0000000000000000 *** Control State *** PinBased=0000003f CPUBased=b699edfa SecondaryExec=0000004a EntryControls=0000d1ff ExitControls=0023efff ExceptionBitmap=00060042 PFECmask=00000000 PFECmatch=00000000 VMEntry: intr_info=00000000 errcode=00000000 ilen=00000000 VMExit: intr_info=00000000 errcode=00000000 ilen=00000000 reason=80000021 qualification=0000000000000000 IDTVectoring: info=00000000 errcode=00000000 TSC Offset = 0xffffffe059af8a28 EPT pointer = 0x00000001c305c01e sctp: [Deprecated]: syz-executor2 (pid 5469) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor2 (pid 5478) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead RFLAGS=0x00000002 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 = 0x0000000000005001 PAT = 0x0007040600070406 DebugCtl = 0x0000000000000000 DebugExceptions = 0x0000000000000000 Interruptibility = 00000000 ActivityState = 00000000 *** Host State *** RIP = 0xffffffff811b8fd7 RSP = 0xffff8801c530f4c8 CS=0010 SS=0018 DS=0000 ES=0000 FS=0000 GS=0000 TR=0040 FSBase=00007f19bde2e700 GSBase=ffff8801db300000 TRBase=ffff8801db323100 GDTBase=ffffffffff576000 IDTBase=ffffffffff57b000 CR0=0000000080050033 CR3=00000001c914f000 CR4=00000000001426e0 Sysenter RSP=0000000000000000 CS:RIP=0010:ffffffff84da5a60 EFER = 0x0000000000000d01 PAT = 0x0000000000000000 *** Control State *** PinBased=0000003f CPUBased=b6a1edfa SecondaryExec=0000004b EntryControls=0000d1ff ExitControls=0023efff ExceptionBitmap=00060042 PFECmask=00000000 PFECmatch=00000000 VMEntry: intr_info=00000000 errcode=00000000 ilen=00000000 VMExit: intr_info=00000000 errcode=00000000 ilen=00000000 reason=80000021 qualification=0000000000000000 IDTVectoring: info=00000000 errcode=00000000 TSC Offset = 0xffffffe061a20959 TPR Threshold = 0x00 EPT pointer = 0x00000001c686801e TCP: request_sock_TCP: Possible SYN flooding on port 20008. Sending cookies. Check SNMP counters. audit: type=1326 audit(1503689733.950:19): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5506 comm="syz-executor4" exe="/root/syz-executor4" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0xffff0000 netlink: 21 bytes leftover after parsing attributes in process `syz-executor4'. audit: type=1326 audit(1503689734.062:20): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5506 comm="syz-executor4" exe="/root/syz-executor4" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0xffff0000 netlink: 21 bytes leftover after parsing attributes in process `syz-executor4'. lo: Invalid MTU -33619942 requested, hw min 0 QAT: Invalid ioctl tty_warn_deprecated_flags: 'syz-executor5' is using deprecated serial flags (with no effect): 00000400 QAT: Invalid ioctl QAT: Invalid ioctl tty_warn_deprecated_flags: 'syz-executor5' is using deprecated serial flags (with no effect): 00000400 lo: Invalid MTU -33619942 requested, hw min 0 QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl sctp: [Deprecated]: syz-executor3 (pid 5652) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor3 (pid 5652) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor3 (pid 5673) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor3 (pid 5678) Use of int in maxseg socket option. Use struct sctp_assoc_value instead netlink: 4 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor0'. TCP: request_sock_TCP: Possible SYN flooding on port 20012. Sending cookies. Check SNMP counters. dccp_invalid_packet: P.CsCov 3 exceeds packet length 236 dccp_invalid_packet: P.Data Offset(0) too small netlink: 11 bytes leftover after parsing attributes in process `syz-executor0'. TCP: request_sock_TCPv6: Possible SYN flooding on port 20024. Sending cookies. Check SNMP counters. netlink: 11 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 11 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 11 bytes leftover after parsing attributes in process `syz-executor0'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=6036 comm=syz-executor0 netlink: 11 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor7'. kauditd_printk_skb: 2 callbacks suppressed audit: type=1326 audit(1503689737.043:23): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=6184 comm="syz-executor4" exe="/root/syz-executor4" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0xffff0000 audit: type=1326 audit(1503689737.154:24): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=6184 comm="syz-executor4" exe="/root/syz-executor4" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0xffff0000 audit: type=1326 audit(1503689737.317:25): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=6248 comm="syz-executor1" exe="/root/syz-executor1" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0xffff0000 audit: type=1326 audit(1503689737.396:26): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=6248 comm="syz-executor1" exe="/root/syz-executor1" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4512e9 code=0xffff0000 QAT: Invalid ioctl