From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754659AbZGEVVh (ORCPT ); Sun, 5 Jul 2009 17:21:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753801AbZGEVV2 (ORCPT ); Sun, 5 Jul 2009 17:21:28 -0400 Received: from victor.provo.novell.com ([137.65.250.26]:60665 "EHLO victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753743AbZGEVV1 (ORCPT ); Sun, 5 Jul 2009 17:21:27 -0400 Message-ID: <4A51194D.8000403@novell.com> Date: Sun, 05 Jul 2009 17:21:17 -0400 From: Gregory Haskins User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: Avi Kivity CC: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, mst@redhat.com, davidel@xmailserver.org Subject: Re: [KVM PATCH v9 0/5] irqfd fixes and enhancements References: <20090702153454.20186.99191.stgit@dev.haskins.net> <4A4CD729.6050300@redhat.com> <4A50723E.6030305@redhat.com> In-Reply-To: <4A50723E.6030305@redhat.com> X-Enigmail-Version: 0.95.7 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig3618C4AD8C6FF7C25E60662E" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3618C4AD8C6FF7C25E60662E Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Avi Kivity wrote: > On 07/02/2009 06:50 PM, Avi Kivity wrote: >> On 07/02/2009 06:37 PM, Gregory Haskins wrote: >>> (Applies to kvm.git/master:1f9050fd) >>> >>> The following is the latest attempt to fix the races in >>> irqfd/eventfd, as >>> well as restore DEASSIGN support. For more details, please read the >>> patch >>> headers. >>> >>> As always, this series has been tested against the kvm-eventfd unit >>> test >>> and everything appears to be functioning properly. You can download >>> this >>> test here: >> >> Applied, thanks. >> > > ... and unapplied. There's a refcounting mismatch in irqfd_cleanup: a > reference is taken for each irqfd, but dropped for each guest. Doh! Note that the kvm->irqfds.init boolean was supposed to make it both acquire and release the reference on a per-vm basis. Obviously, something is wrong. :) But I see later in the thread you guys have already figured out that only the last patch needs to be reverted. Ill take a look at the last patch and fix the issue once I am back in the office tomorrow. Sorry for the trouble. Kind Regards, -Greg > This causes an oops if a guest with no irqfds is created and destroye= d: > > IP: [] flush_workqueue+0x23/0x6e > PGD 0 > Oops: 0000 [4] SMP > CPU 1 > Modules linked in: kvm_intel kvm nfs lockd nfs_acl sco bridge stp bnep > l2cap bluetooth autofs4 sunrpc ipv6 dm_multipath uinput i5000_edac > e1000e edac_core iTCO_wdt > iTCO_vendor_support i2c_i801 i2c_core e100 mii floppy pcspkr shpchp > serio_raw ata_generic pata_acpi [last unloaded: kvm] > Pid: 2088, comm: qemu Tainted: G D =20 > 2.6.27.19-170.2.35.fc10.x86_64 #1 TYAN Transport GT20-B5372 > RIP: 0010:[] [] > flush_workqueue+0x23/0x6e > RSP: 0018:ffff8801077d1b08 EFLAGS: 00010292 > RAX: ffffffff8156de08 RBX: ffff8801097e8a50 RCX: 0000000000000000 > RDX: 0000000000000000 RSI: 000000000000019f RDI: 0000000000000000 > RBP: ffff8801077d1b28 R08: 0000000000000000 R09: ffffffff81140027 > R10: ffff88012f402340 R11: ffff880125daf820 R12: ffffffff8156de10 > R13: 0000000000000000 R14: ffff88012f449cd8 R15: ffff88012f002900 > FS: 00007f9b67295950(0000) GS:ffff88012fc04980(0000) > knlGS:0000000000000000 > CS: 0010 DS: 002b ES: 002b CR0: 000000008005003b > CR2: 0000000000000020 CR3: 0000000000201000 CR4: 00000000000026e0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 > Process qemu (pid: 2088, threadinfo ffff8801077d0000, task > ffff88012984c530) > Stack: ffff8801077d1b28 ffff8801097e8a50 ffff8801097e8000 > ffff8801097e8a68 > ffff8801077d1b58 ffffffffa01c4eec 0000000800000000 ffff8801097e8000 > ffff88012f449cd8 ffff88012c80c600 ffff8801077d1b78 ffffffffa01af34b > Call Trace: > [] kvm_irqfd_release+0x7a/0xcc [kvm] > [] kvm_vm_release+0x18/0x27 [kvm] > [] __fput+0xca/0x16d > [] fput+0x15/0x17 > [] filp_close+0x67/0x72 > [] put_files_struct+0x74/0xc8 > [] exit_files+0x48/0x51 > [] do_exit+0x26a/0x8a0 > [] ? vmx_vcpu_put+0x9/0xb [kvm_intel] > [] do_group_exit+0x82/0xaf > [] get_signal_to_deliver+0x2b0/0x2dc > [] ? sysret_signal+0x42/0x71 > [] do_notify_resume+0x90/0x93f > [] ? do_futex+0x90/0x973 > [] ? kvm_vcpu_ioctl+0x470/0x485 [kvm] > [] ? trace_hardirqs_on_thunk+0x3a/0x3c > [] ? sys_futex+0xf5/0x113 > [] ? sysret_signal+0x42/0x71 > [] ptregscall_common+0x67/0xb0 > > irqfd_cleanup.wq has never been initialized, but is destroyed. > --------------enig3618C4AD8C6FF7C25E60662E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkpRGVEACgkQlOSOBdgZUxl6FwCfZr0+6SOV6HaFFHiLXrs0mD1y 2X8Anifta5sQv8oPgzEDgTS60JeGWTq0 =SKpz -----END PGP SIGNATURE----- --------------enig3618C4AD8C6FF7C25E60662E--