On Fri, Feb 25, 2005 at 10:46:50AM -0500, Alan Stern wrote:
> On Thu, 24 Feb 2005, Greg KH wrote:
> 
> > Ok, here's 3 patches that read the strings from the device at insertion
> > time, and cache them.  It makes the sysfs and /proc/bus/usb/devices file
> > use these string values to prevent bus accesses from happening at
> > inopportune times.
> 
> > I've added these three patches to my trees, but comments are appreciated
> > if I've missed anything.
> 
> Your new get_string() routine in hub.c leaks a memory buffer if the 
> usb_string() call fails.
> 
> You don't store the iInterface string for non-active interfaces.

No, it's only asked for from the device when the interface is made
active.  Is this a problem?

> Although 
> there don't seem to be any users for such strings at the moment, there 
> very well could be.  For instance, doesn't it seem strange that 
> /proc/bus/usb/devices doesn't print the iConfiguration and iInterface 
> strings?

I don't think anyone actually had a device back then that had the
strings in them to report :)

> Would it mess up any programs to add them in?

It "shouldn't", but who knows what nastyness lurks in the programs that
parse that data.

I say just leave it alone.  Some distros disable access to that file
entirely, due to the "fetch the string" issue, so it's not that
important.

thanks,

greg k-h


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to