Re: 3.10.4: kmemleak in usb_get_bos_descriptor()?

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

 



On Mon, 26 Aug 2013, Xenia Ragiadakou wrote:

> I will send a patch as RFC because i am not quite familiar and because i 
> have a problem to run kmemleak effectively (i can only scan for a few 
> seconds, although i have set all necessary kmemleak configuration, i 
> have not figured out why yet).
> 
> I perform the deallocation outside the descriptors_changed(). That leads 
> to code duplication, but if i perform it inside, the function will do 
> something that is not expected to do, right?

Right.

> Also, another thing is that even if the device descriptors have not 
> change (and thus the bcdUSB), there is still the possibility one of the 
> two bos descriptors to be null while the other one is not, either due to 
> a kmalloc() failure or in case the usb device version is in the range 
> [0x201, 0x210) where bos descriptors are optional and if new firmware is 
> downloaded in the device may has as result to add or remove the bos 
> descriptor support. Am i thinking correctly here?

That's right.  Any difference at all should cause the device to be 
re-enumerated.

Alan Stern

--
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