====================================================== WARNING: possible circular locking dependency detected 4.13.0-rc6-next-20170825+ #9 Not tainted ------------------------------------------------------ kworker/1:1/799 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/1:1/799: #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: 1 PID: 799 Comm: kworker/1:1 Not tainted 4.13.0-rc6-next-20170825+ #9 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 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 kvm [5220]: vcpu0, guest rIP: 0x9135 Hyper-V unhandled rdmsr: 0x4000008f kvm [5220]: vcpu0, guest rIP: 0x9135 Hyper-V unhandled rdmsr: 0x4000008e kvm [5220]: vcpu0, guest rIP: 0x9135 Hyper-V unhandled rdmsr: 0x4000008d kvm [5220]: vcpu0, guest rIP: 0x9135 Hyper-V unhandled rdmsr: 0x4000008c kvm [5220]: vcpu0, guest rIP: 0x9135 Hyper-V unhandled rdmsr: 0x4000008b kvm [5220]: vcpu0, guest rIP: 0x9135 Hyper-V unhandled rdmsr: 0x4000008a kvm [5220]: vcpu0, guest rIP: 0x9135 Hyper-V unhandled rdmsr: 0x40000089 kvm [5220]: vcpu0, guest rIP: 0x9135 Hyper-V unhandled rdmsr: 0x40000088 kvm [5220]: vcpu0, guest rIP: 0x9135 Hyper-V unhandled rdmsr: 0x40000087 kvm [5220]: vcpu0, guest rIP: 0x9135 Hyper-V unhandled rdmsr: 0x40000086 kvm [5220]: vcpu0, guest rIP: 0x9112 Hyper-V uhandled wrmsr: 0x40000023 data 0x66c900003b9a1043 kvm [5220]: vcpu0, guest rIP: 0x9112 Hyper-V uhandled wrmsr: 0x40000022 data 0x66c90000cb211043 netlink: 1 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 13 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 13 bytes leftover after parsing attributes in process `syz-executor5'. *** Guest State *** CR0: actual=0x0000000000000030, shadow=0x0000000060000010, gh_mask=fffffffffffffff7 CR4: actual=0x0000000000002050, shadow=0x0000000000000000, gh_mask=ffffffffffffe871 CR3 = 0x00000000fffbc000 RSP = 0x0000000000000000 RIP = 0x000000000000fff0 RFLAGS=0x00000100 DR7 = 0x0000000000000402 Sysenter RSP=0000000000000000 CS:RIP=0000:0000000000000000 CS: sel=0xf000, attr=0x0009b, limit=0x0000ffff, base=0x00000000ffff0000 DS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 SS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 ES: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 FS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 GS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 GDTR: limit=0x0000ffff, base=0x0000000000000000 LDTR: sel=0x0000, attr=0x00082, limit=0x0000ffff, base=0x0000000000000000 IDTR: limit=0x0000ffff, base=0x0000000000000000 TR: sel=0x0000, attr=0x0008b, limit=0x0000ffff, base=0x0000000000000000 EFER = 0x0000000000000000 PAT = 0x0007040600070406 DebugCtl = 0x0000000000000000 DebugExceptions = 0x0000000000000000 BndCfgS = 0x0000000000000000 Interruptibility = 00000000 ActivityState = 00000000 *** Host State *** RIP = 0xffffffff811b8fd7 RSP = 0xffff880039c474c8 CS=0010 SS=0018 DS=0000 ES=0000 FS=0000 GS=0000 TR=0040 FSBase=00007f34d259f700 GSBase=ffff88006de00000 TRBase=ffff88006de23100 GDTBase=ffffffffff575000 IDTBase=ffffffffff57b000 CR0=0000000080050033 CR3=00000000698ad000 CR4=00000000000026e0 Sysenter RSP=0000000000000000 CS:RIP=0010:ffffffff84da5a70 EFER = 0x0000000000000d01 PAT = 0x0007040600070406 *** Control State *** PinBased=0000003f CPUBased=b699edfa SecondaryExec=000000e2 EntryControls=0001d1ff ExitControls=00afefff ExceptionBitmap=0006004a PFECmask=00000000 PFECmatch=00000000 VMEntry: intr_info=80000301 errcode=00000000 ilen=00000000 VMExit: intr_info=00000000 errcode=00000000 ilen=00000000 reason=80000021 qualification=0000000000000000 IDTVectoring: info=00000000 errcode=00000000 TSC Offset = 0xffffffd1e2f5f240 EPT pointer = 0x000000004cc8901e Virtual processor ID = 0x0036 audit: type=1326 audit(1503861558.950:10): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5471 comm="syz-executor6" exe="/syz-executor6" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0x0 device syz3 entered promiscuous mode ALSA: seq fatal error: cannot create timer (-22) audit: type=1326 audit(1503861559.059:11): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5471 comm="syz-executor6" exe="/syz-executor6" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0x0 audit: type=1326 audit(1503861559.071:12): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5519 comm="syz-executor7" exe="/syz-executor7" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0x0 netlink: 9 bytes leftover after parsing attributes in process `syz-executor4'. A link change request failed with some changes committed already. Interface lo may have been left with an inconsistent configuration, please check. QAT: Invalid ioctl audit: type=1326 audit(1503861559.243:13): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5560 comm="syz-executor4" exe="/syz-executor4" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 QAT: Invalid ioctl netlink: 9 bytes leftover after parsing attributes in process `syz-executor4'. A link change request failed with some changes committed already. Interface lo may have been left with an inconsistent configuration, please check. audit: type=1326 audit(1503861559.414:14): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5560 comm="syz-executor4" exe="/syz-executor4" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 netlink: 5 bytes leftover after parsing attributes in process `syz-executor1'. QAT: Invalid ioctl QAT: Invalid ioctl sock: process `syz-executor4' is using obsolete setsockopt SO_BSDCOMPAT device lo entered promiscuous mode netlink: 7 bytes leftover after parsing attributes in process `syz-executor2'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=5706 comm=syz-executor2 9pnet_virtio: no channels available for device ./control 9pnet_virtio: no channels available for device ./control audit: type=1326 audit(1503861559.898:15): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5809 comm="syz-executor2" exe="/syz-executor2" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 audit: type=1326 audit(1503861559.982:16): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5809 comm="syz-executor2" exe="/syz-executor2" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 capability: warning: `syz-executor4' uses deprecated v2 capabilities in a way that may be insecure 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:f0:0e:18/00:00:f0:0e:18/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 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=3 sclass=netlink_route_socket pig=6041 comm=syz-executor4 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=6041 comm=syz-executor4 xprt_adjust_timeout: rq_timeout = 0! SELinux: unrecognized netlink message: protocol=0 nlmsg_type=51 sclass=netlink_route_socket pig=6041 comm=syz-executor4 xprt_adjust_timeout: rq_timeout = 0! SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=6041 comm=syz-executor4 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=6070 comm=syz-executor4 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=3 sclass=netlink_route_socket pig=6082 comm=syz-executor4 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=6082 comm=syz-executor4 audit: type=1326 audit(1503861560.407:17): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=6093 comm="syz-executor5" exe="/syz-executor5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 audit: type=1326 audit(1503861560.447:18): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=6093 comm="syz-executor5" exe="/syz-executor5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 audit: type=1326 audit(1503861560.456:19): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=6105 comm="syz-executor2" exe="/syz-executor2" sig=31 arch=c000003e syscall=202 compat=0 ip=0x446749 code=0xffff0000 sctp: [Deprecated]: syz-executor3 (pid 6145) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor3 (pid 6145) Use of int in maxseg socket option. Use struct sctp_assoc_value instead [drm:drm_mode_legacy_fb_format] *ERROR* bad bpp, assuming x8r8g8b8 pixel format [drm:drm_mode_legacy_fb_format] *ERROR* bad bpp, assuming x8r8g8b8 pixel format hid-generic 0003:0627:0001.0001: pid 6280 passed too short report hid-generic 0003:0627:0001.0001: pid 6359 passed too short report dccp_v4_rcv: dropped packet with invalid checksum dccp_v4_rcv: dropped packet with invalid checksum selinux_nlmsg_perm: 3 callbacks suppressed SELinux: unrecognized netlink message: protocol=0 nlmsg_type=14606 sclass=netlink_route_socket pig=6450 comm=syz-executor2 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=6463 comm=syz-executor6 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=14606 sclass=netlink_route_socket pig=6469 comm=syz-executor2 nla_parse: 14 callbacks suppressed netlink: 1 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor4'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=6560 comm=syz-executor5 syz4: Invalid MTU 26 requested, hw min 68 kvm [6690]: vcpu2, guest rIP: 0xfff0 Hyper-V uhandled wrmsr: 0x40000020 data 0x4 syz4: Invalid MTU 26 requested, hw min 68 kvm [6690]: vcpu2, guest rIP: 0xfff0 Hyper-V uhandled wrmsr: 0x40000020 data 0x4 netlink: 4 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor1'. RDS: rds_bind could not find a transport for 224.0.0.1, load rds_tcp or rds_rdma? RDS: rds_bind could not find a transport for 224.0.0.1, load rds_tcp or rds_rdma? sctp: [Deprecated]: syz-executor4 (pid 6977) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor4 (pid 6977) Use of int in maxseg socket option. Use struct sctp_assoc_value instead Can not set IPV6_FL_F_REFLECT if flowlabel_consistency sysctl is enable do_dccp_setsockopt: sockopt(CHANGE_L/R) is deprecated: fix your app sock: sock_set_timeout: `syz-executor1' (pid 7015) tries to set negative timeout Can not set IPV6_FL_F_REFLECT if flowlabel_consistency sysctl is enable netlink: 1 bytes leftover after parsing attributes in process `syz-executor3'. IPv6: NLM_F_REPLACE set, but no existing node found! netlink: 1 bytes leftover after parsing attributes in process `syz-executor3'. IPv6: NLM_F_REPLACE set, but no existing node found! TCP: request_sock_TCP: Possible SYN flooding on port 20028. Sending cookies. Check SNMP counters. RDS: rds_bind could not find a transport for 172.20.0.187, load rds_tcp or rds_rdma?