Skip to content

Commit 552ca6b

Browse files
claudiubezneagregkh
authored andcommitted
usb: renesas_usbhs: Flush the notify_hotplug_work
When performing continuous unbind/bind operations on the USB drivers available on the Renesas RZ/G2L SoC, a kernel crash with the message "Unable to handle kernel NULL pointer dereference at virtual address" may occur. This issue points to the usbhsc_notify_hotplug() function. Flush the delayed work to avoid its execution when driver resources are unavailable. Fixes: bc57381 ("usb: renesas_usbhs: use delayed_work instead of work_struct") Cc: stable <stable@kernel.org> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://lore.kernel.org/r/20250225110248.870417-4-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e0c9244 commit 552ca6b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/usb/renesas_usbhs/common.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,8 @@ static void usbhs_remove(struct platform_device *pdev)
781781

782782
dev_dbg(&pdev->dev, "usb remove\n");
783783

784+
flush_delayed_work(&priv->notify_hotplug_work);
785+
784786
/* power off */
785787
if (!usbhs_get_dparam(priv, runtime_pwctrl))
786788
usbhsc_power_ctrl(priv, 0);

0 commit comments

Comments
 (0)