[Bugme-new] [Bug 12449] New: uvcvideo memory allocation fails

bugme-daemon at bugzilla.kernel.org bugme-daemon at bugzilla.kernel.org
Wed Jan 14 16:11:25 PST 2009


http://bugzilla.kernel.org/show_bug.cgi?id=12449

           Summary: uvcvideo memory allocation fails
           Product: Drivers
           Version: 2.5
     KernelVersion: 2.6.29-rc1
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Other
        AssignedTo: drivers_other at kernel-bugs.osdl.org
        ReportedBy: johannes at sipsolutions.net


Latest working kernel version: n/a
Earliest failing kernel version: 2.6.28
Distribution: debian/unstable
Hardware Environment: macbook5,1

Every once a while I try using my webcam, I get a memory allocation failure
because uvcvideo tries to do an order-5 allocation, and fails due to memory
fragmentation.

I "fixed" this with this patch which limits it, on my machine, to an order-2
allocation:

--- a/drivers/media/video/uvc/uvc_video.c
+++ b/drivers/media/video/uvc/uvc_video.c
@@ -761,8 +761,8 @@ static int uvc_init_video_isoc(struct uvc_video_device
*vide
                return -EINVAL;

        npackets = DIV_ROUND_UP(size, psize);
-       if (npackets > UVC_MAX_ISO_PACKETS)
-               npackets = UVC_MAX_ISO_PACKETS;
+       if (npackets > 4)
+               npackets = 4;

        size = npackets * psize;


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


More information about the Bugme-new mailing list