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

From: Greg Kroah-Hartman

Date: Sun Mar 15 2026 - 05:48:03 EST


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.

And sorry for the extra review, I'm a bit picky about this function, it
was my first contribution to Linux way back in 1999 or so, and happen to
know too much about USB descriptor strings :)

thanks,

greg k-h