lkml.org 
[lkml]   [2000]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRE: 3-order allocation failed
Date
Wow, I bet that's been there awhile.

BTW, did you submit this patch earlier? I don't
recall having seen it.

I'll forward it.

Thanks,
~Randy_________________________________________
|randy.dunlap_at_intel.com 503-677-5408|
|NOTE: Any views presented here are mine alone|
|& may not represent the views of my employer.|
-----------------------------------------------

> -----Original Message-----
> From: Anthony Towns [mailto:aj@azure.humbug.org.au]
> Sent: Wednesday, November 01, 2000 2:21 PM
> To: unlisted-recipients
> Cc: 'Pasi Kärkkäinen'; Rik van Riel; Forever shall I be.;
> linux-kernel@vger.kernel.org
> Subject: Re: 3-order allocation failed
>
>
> On Wed, Nov 01, 2000 at 01:42:17PM -0800, Dunlap, Randy wrote:
> > > Is this bug in the usb-driver (usb-uhci), in the camera's driver
> > > (cpia_usb) or in the v4l?
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Could there be a memory leak as well? But I expect that
> > it's simply that memory is just fragmented so that enough
> > contiguous pages aren't available, like Rik said.
>
> There is a memory leak, the memory kmalloc'ed in cpia_usb_open for
> sbuf[*].data is never kfree'd (except when an error occurs during
> initialisation). Adding some kfree's in cpia_usb_free_resources fixed
> the problem in test7 or so, here's a patch against -test10.
>
> --- drivers/media/video/cpia_usb.c.orig Wed Nov 1 14:14:37 2000
> +++ drivers/media/video/cpia_usb.c Wed Nov 1 14:16:05 2000
> @@ -432,10 +432,20 @@
> ucpia->sbuf[1].urb = NULL;
> }
>
> + if (ucpia->sbuf[1].data) {
> + kfree(ucpia->sbuf[1].data);
> + ucpia->sbuf[1].data = NULL;
> + }
> +
> if (ucpia->sbuf[0].urb) {
> usb_unlink_urb(ucpia->sbuf[0].urb);
> usb_free_urb(ucpia->sbuf[0].urb);
> ucpia->sbuf[0].urb = NULL;
> + }
> +
> + if (ucpia->sbuf[0].data) {
> + kfree(ucpia->sbuf[0].data);
> + ucpia->sbuf[0].data = NULL;
> }
> }
>
> HTH.
>
> Cheers,
> aj
>
> --
> Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
> I don't speak for anyone save myself. GPG signed mail preferred.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.021 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site