From: "Jan Beulich" Subject: Re: [PATCH] pciback: check function return values Date: Wed, 04 Apr 2007 08:53:13 +0100 Message-ID: <46137589.76E4.0078.0@novell.com> References: <460A7D47.76E4.0078.0@novell.com> <4612793B.5060406@tycho.ncsc.mil> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4612793B.5060406@tycho.ncsc.mil> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Chris Bookholt Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> Chris Bookholt 03.04.07 17:56 >>> >Jan Beulich wrote: >> .. of functions declared with __must_check post-2.6.18. >> >> (As a note - I'm getting the impression that when used as a module, pciback >> appears to have a number of memory leaks). > >Jan, thanks for the added robustness by way of return value checking. > >What gives you the impression there are memory leaks when pciback is >loaded as a module? The more specific you can be the easier problems >are to find and fix. First thing pcistub_init() does is parse the hide option, calling pcistub_device_id_add(). If subsequent steps fail, or if the driver is unloaded, this isn't being cleaned up. There are others that look suspicious, but this is certainly easier to determine for someone more familiar with the code than I am. Jan