From: David Brownell Subject: Re: [RFC / PATCH] [SPI] get_module while using it. Date: Fri, 2 May 2008 12:58:06 -0700 Message-ID: <200805021258.06573.david-b@pacbell.net> References: <20080414194549.GA1363@www.tglx.de> <200805021055.11267.david-b@pacbell.net> <20080502192929.GA20326@www.tglx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Sebastian Siewior Return-path: In-Reply-To: <20080502192929.GA20326-Hfxr4Dq0UpYb1SvskN2V4Q@public.gmane.org> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org On Friday 02 May 2008, Sebastian Siewior wrote: > >That memory is freed only by spidev_classdev_release(), so > >it looks like this particular issue is a refcounting bug. > >I'll look at it later (unless you make time for it first). > > I try what I can do tomorrow but I probably can't before sunday. Looks to me like the refcounting on spidev->users is insufficient. That covers the buffer. Separately, each open and each release should probably update the refcount on spidev->dev itself. - dave ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone