summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>2025-02-25 13:02:48 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-03-13 12:53:20 +0100
commit4ca078084cdd5f32d533311d6a0b63a60dcadd41 (patch)
treed1306b8dae5efb9e788dac0166cf52c23cfdc4c3 /drivers/usb
parentad379788a5d3d81bf60a2d08df4d84b53e5b390c (diff)
downloadlinux-4ca078084cdd5f32d533311d6a0b63a60dcadd41.tar.gz
linux-4ca078084cdd5f32d533311d6a0b63a60dcadd41.tar.bz2
linux-4ca078084cdd5f32d533311d6a0b63a60dcadd41.zip
usb: renesas_usbhs: Flush the notify_hotplug_work
commit 552ca6b87e3778f3dd5b87842f95138162e16c82 upstream. 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: bc57381e6347 ("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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/renesas_usbhs/common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index a29c348bfb03..9af61f17dfc7 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -770,6 +770,8 @@ static int usbhs_remove(struct platform_device *pdev)
dev_dbg(&pdev->dev, "usb remove\n");
+ flush_delayed_work(&priv->notify_hotplug_work);
+
/* power off */
if (!usbhs_get_dparam(priv, runtime_pwctrl))
usbhsc_power_ctrl(priv, 0);