From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] kvm: fix irqfd assign/deassign race Date: Mon, 20 Sep 2010 15:35:47 -0300 Message-ID: <20100920183547.GC27404@amt.cnet> References: <20100919170231.GA12620@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Tejun Heo , Gregory Haskins , kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:25243 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754935Ab0ITTLm (ORCPT ); Mon, 20 Sep 2010 15:11:42 -0400 Content-Disposition: inline In-Reply-To: <20100919170231.GA12620@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Sep 19, 2010 at 07:02:31PM +0200, Michael S. Tsirkin wrote: > I think I see the following (theoretical) race: > > During irqfd assign, we drop irqfds lock before we > schedule inject work. Therefore, deassign running > on another CPU could cause shutdown and flush to run > before inject, causing user after free in inject. > > A simple fix it to schedule inject under the lock. > > Signed-off-by: Michael S. Tsirkin > --- Applied, thanks.