[PATCH] xhci_register: Fix double free on failure

Bin Meng bmeng.cn at gmail.com
Tue Jul 25 04:22:22 CEST 2023


On Tue, Jul 25, 2023 at 3:45 AM Richard Habeeb <richard.habeeb at gmail.com> wrote:
>
> drivers/core/device.c will call `device_free()` after xhci_register
> already frees the private device data. This can cause a crash later
> during the boot process, observed on aarch64 RPi4b as a synchronous
> exception. All callers of xhci_register use priv_auto, so this won't
> lead to memory leaks.
>
> Signed-off-by: Richard Habeeb <richard.habeeb at gmail.com>
> ---
>
>  drivers/usb/host/xhci.c | 1 -
>  1 file changed, 1 deletion(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list