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:[email protected]]
> Sent: Wednesday, November 01, 2000 2:21 PM
> To: unlisted-recipients
> Cc: 'Pasi K?rkk?inen'; Rik van Riel; Forever shall I be.;
> [email protected]
> 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 <[email protected]> <http://azure.humbug.org.au/~aj/>
> I don't speak for anyone save myself. GPG signed mail preferred.