Re: [PATCH] USB: core: Use `krealloc()` in `usb_cache_string()`

From: Greg Kroah-Hartman

Date: Sun Mar 15 2026 - 06:47:59 EST


On Sun, Mar 15, 2026 at 11:34:52AM +0100, Bence Csókás wrote:
>
>
> On 3/15/26 10:59, Bence Csókás wrote:
> > Hi,
> >
> > On 3/15/26 10:47, Greg Kroah-Hartman wrote:
> > > On Sun, Mar 15, 2026 at 10:40:48AM +0100, Bence Csókás wrote:
> > > > > Also, how was this tested?
> > > >
> > > > I just compiled and booted it on my Arch box (with the original vendor
> > > > config), an AthlonII X2 PC. I'm now typing this mail on a USB
> > > > keyboard and
> > > > mouse under Plasma, running this kernel :) I also plugged in a pendrive,
> > > > mounted it, `ls`'d the mount, unmounted, unplugged, and did this 2 more
> > > > times.
> > > >
> > > > I realize I should probably put this info under the dashes. I'll
> > > > prepare a
> > > > v2.
> > >
> > > Try looking at the USB strings in the device, as that's the path here
> > > that is exercised.  Just using the device doesn't actually grab them
> > > from the descriptor table.
> >
> > Sure.
> >
> >   $ sudo lsusb -vvv | grep iProduct
> >   can't get debug descriptor: Resource temporarily unavailable
> >     iProduct                2 OHCI PCI host controller
> >     iProduct                2 HP USB Smart Card Keyboard
> >   can't get device qualifier: Resource temporarily unavailable
> >   can't get debug descriptor: Resource temporarily unavailable
> >     iProduct                2 USB OPTICAL MOUSE
> >   can't get debug descriptor: Resource temporarily unavailable
> >   can't get device qualifier: Resource temporarily unavailable
> >   can't get debug descriptor: Resource temporarily unavailable
> >     iProduct                2 EHCI Host Controller
> >     iProduct                2 EHCI Host Controller
> >   can't get device qualifier: Resource temporarily unavailable
> >   can't get debug descriptor: Resource temporarily unavailable
> >   can't get debug descriptor: Resource temporarily unavailable
> >     iProduct                2 Disk 2.0
> >     iProduct                2 EHCI Host Controller
> >   can't get device qualifier: Resource temporarily unavailable
> >   can't get debug descriptor: Resource temporarily unavailable
> >   can't get debug descriptor: Resource temporarily unavailable
> >     iProduct                2 OHCI PCI host controller
> >     iProduct                2 OHCI PCI host controller
> >   can't get debug descriptor: Resource temporarily unavailable
> >   can't get debug descriptor: Resource temporarily unavailable
> >     iProduct                2 OHCI PCI host controller
> >
> > Are these -EAGAINs cause for concern?
>
> It happens with the vendor kernel (6.19.8-arch1-1) too, so it's probably
> just some weirdness in my HW...

You can't get the debug descriptor when a driver is bound to the device.
Also look at the iManufacturer string, that should be coming from the
device (except for the root hub, that descriptor comes from the kernel.)

thanks,

greg k-h