From patchwork Wed Jan 13 17:12:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 72678 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0DHGDeN023570 for ; Wed, 13 Jan 2010 17:16:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756187Ab0AMRPb (ORCPT ); Wed, 13 Jan 2010 12:15:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756059Ab0AMRP3 (ORCPT ); Wed, 13 Jan 2010 12:15:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:2869 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756049Ab0AMRP0 (ORCPT ); Wed, 13 Jan 2010 12:15:26 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0DHFQUF028065 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 13 Jan 2010 12:15:26 -0500 Received: from redhat.com (vpn2-11-140.ams2.redhat.com [10.36.11.140]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id o0DHFNVT012718; Wed, 13 Jan 2010 12:15:24 -0500 Date: Wed, 13 Jan 2010 19:12:30 +0200 From: "Michael S. Tsirkin" To: Davide Libenzi , "Michael S. Tsirkin" , Avi Kivity , kvm@vger.kernel.org, Linux Kernel Mailing List Subject: [PATCH 1/2] kvm: fix spurious interrupt with irqfd Message-ID: <20100113171230.GB19798@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 62e4cd9..a9d3fc6 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c @@ -72,12 +72,13 @@ static void irqfd_shutdown(struct work_struct *work) { struct _irqfd *irqfd = container_of(work, struct _irqfd, shutdown); + u64 cnt; /* * Synchronize with the wait-queue and unhook ourselves to prevent * further events. */ - remove_wait_queue(irqfd->wqh, &irqfd->wait); + eventfd_ctx_remove_wait_queue(irqfd->eventfd, &irqfd->wait, &cnt); /* * We know no new events will be scheduled at this point, so block