From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932153Ab2GQV7z (ORCPT ); Tue, 17 Jul 2012 17:59:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24124 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932112Ab2GQV7u (ORCPT ); Tue, 17 Jul 2012 17:59:50 -0400 Date: Wed, 18 Jul 2012 01:00:21 +0300 From: "Michael S. Tsirkin" To: Alex Williamson Cc: avi@redhat.com, gleb@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, jan.kiszka@siemens.com Subject: Re: [PATCH v5 1/4] kvm: Extend irqfd to support level interrupts Message-ID: <20120717220021.GE1868@redhat.com> References: <20120716202711.1752.71007.stgit@bling.home> <20120716203344.1752.14606.stgit@bling.home> <20120717212612.GA2018@redhat.com> <1342562261.2229.155.camel@bling.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1342562261.2229.155.camel@bling.home> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 17, 2012 at 03:57:41PM -0600, Alex Williamson wrote: > On Wed, 2012-07-18 at 00:26 +0300, Michael S. Tsirkin wrote: > > On Mon, Jul 16, 2012 at 02:33:47PM -0600, Alex Williamson wrote: > > > @@ -96,6 +183,9 @@ irqfd_shutdown(struct work_struct *work) > > > * It is now safe to release the object's resources > > > */ > > > eventfd_ctx_put(irqfd->eventfd); > > > + > > > + _irq_source_put(irqfd->source); > > > + > > > kfree(irqfd); > > > } > > > > > > > Hang on, this is a bug I think. This is done asynchronously. So this > > means that I can assign MAX number of irqfds, then close one, and now > ^^^^^^^^^^^^^^^^^^^^ What is this? > Do you mean max irq source ids? Yes, this is what I meant. Sorry about being unclear. > > assign will fail because deassign did not get freed. > > > > Maybe we can solve this by flushing wq before assign? > > Looks a bit fragile but may be enough - need to document well. > > > >