[PATCH v1 11/11] usb: kbd: destroy device after console is stopped
Tom Rini
trini at konsulko.com
Tue Feb 16 22:57:33 CET 2021
On Thu, Feb 11, 2021 at 05:09:44PM +0200, Andy Shevchenko wrote:
> In case of IOMUX enabled it assumes that console devices in the list
> are available to get them stopped properly via ->stop() callback.
> However, the USB keyboard driver violates this assumption and tries
> to play tricks so the device get destroyed while being listed as
> an active console.
>
> Swap the order of device deregistration and IOMUX update along with
> converting to use iomux_replace_device() jelper to avoid the use-after-free.
>
> Fixes: 3cbcb2892809 ("usb: Fix usb_kbd_deregister when console-muxing is used")
> Fixes: 8a8348703081 ("dm: usb: Add a remove() method for USB keyboards")
> Reported-by: Nicolas Saenz Julienne <nsaenzjulienne at suse.de>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210216/fb73ddb8/attachment.sig>
More information about the U-Boot
mailing list