[PATCH] kvm: fix irqfd assign/deassign race

2010-09-19 Thread Michael S. Tsirkin
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

Re: [PATCH] kvm: fix irqfd assign/deassign race

2010-09-19 Thread Gregory Haskins
>>> On 9/19/2010 at 01:02 PM, in message <20100919170231.ga12...@redhat.com>, "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 shut

Re: [PATCH] kvm: fix irqfd assign/deassign race

2010-09-20 Thread Marcelo Tosatti
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, c