Re: gadget: NULL pointer dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/16/2011 04:34 PM, Felipe Balbi wrote:
Hi,

On Tue, Aug 16, 2011 at 04:36:05PM +0800, Yang Rui Rui wrote:
Hi,

I got an oops with gadget CDC ethernet built-in. It is caused by
     see below code:
         switch (gadget->speed) {
         case USB_SPEED_SUPER:
                 descriptors = f->ss_descriptors;
                 break;
         case USB_SPEED_HIGH:
                 descriptors = f->hs_descriptors;
                 break;
         default:
         descriptors = f->descriptors;
         }
         #### oops here
         for (; *descriptors; ++descriptors) {
         ####
     gadget->speed = USB_SPEED_HIGH but f->hs_descriptor is NULL

I fix it by seting the speed as the speed of config functions.
This might be a temporary workaround for me, not sure if it is the
right fix.

I use a linux-omap tree (added some archos gpl driver for their gen8 devices)

Please take a look the fix patch at:
http://gitorious.org/archos-a101-linux-omap/archos-a101-linux-omap/commit/915d027577a36b361274ceb19430d4abdcae40cd

Please take a look at Documentation/SubmittingPatches and send the patch
to us for consideration/integration ;-)


Thanks, will do.

The patch fixed my problem, but infact the condition logic in this patch is not right, I will update  and send out again.

--
Thanks
Yang Ruirui
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux