usb: dwc3: of-simple: fix use-after-free on remove
Quoted 9 lines · Johan Hovold
The clocks have already been explicitly disabled and put as part of
remove()so the runtime suspend callback must not be run when balancing the runtime PM usage count before returning.Fixes 16adc674d0d6 ("usb: dwc3: add generic OF glue layer")Signed-off-by Johan Hovold <[email protected]>---
Changes in v2
Forgot to add a v2 prefix to the subject, sorry.
Quoted 2 lines
- balance usage count only after disabling runtime PM to avoid racing with
pm_runtime_suspend()as suggested by Alan
And this really should be a s/pm_runtime_suspend()/a runtime suspend request/.
I blame the north European heat wave. ;)
Johan
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html