From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH 1/2] virtio: fix memory leak on device removal Date: Thu, 23 Jul 2009 13:27:14 +0300 Message-ID: <20090723102714.GD10860@redhat.com> References: <20090721155909.GB3306@redhat.com> <200907231356.59681.rusty@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christian Borntraeger , virtualization@lists.linux-foundation.org, Anthony Liguori , kvm@vger.kernel.org, avi@redhat.com, Carsten Otte , t@redhat.com To: Rusty Russell Return-path: Received: from mx2.redhat.com ([66.187.237.31]:52280 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751897AbZGWK2o (ORCPT ); Thu, 23 Jul 2009 06:28:44 -0400 Content-Disposition: inline In-Reply-To: <200907231356.59681.rusty@rustcorp.com.au> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Jul 23, 2009 at 01:56:58PM +0930, Rusty Russell wrote: > On Wed, 22 Jul 2009 01:29:09 am Michael S. Tsirkin wrote: > > Free up msi vector tables. > > Michael, this papers over the bug, but doesn't actually fix the problem. > > The problem is that vp_free_vectors() does not do the reverse of > vp_request_vectors. If the author (you) can't get it right, what hope the > rest of us? I agree. This code belongs in free_vectors. And might as well reset the pointers to make the reversal complete. > Indeed, if you look harder, you'll see another leak caused by this problem, > which your patch *didn't* fix. Couldn't spot it yet. I'll send out a fixed patch, see if I got everything covered. > Thanks, > Rusty. > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html