Skip to contentSkip to conversation

usb: dwc3: of-simple: fix use-after-free on remove

DISCUSSION Felipe Balbi 1 participant 1 message Jun 18, 2018 USB

lore
Share & tools
lore
#0 lore raw

Hi,

Quoted 7 lines · Johan Hovold
Quoted 4 lines · Felipe Balbi

I don't use this glue layer, actually. As long as there are no regressions, you can change it to your heart's content. I still it's best to start with pm runtime blocked and let userspace decide what and when should have pm runtime enabled.

Quoted 5 lines

I don't use it either, I just noticed the use-after-free in remove() (and that probe was returning with a positive runtime PM usage count).

I suggest merging this fix for 4.18-rc, and then Roger can rework the driver so that it works also on OMAP.

omap has its own glue layer for several reasons. If you're talking about Keystone devices, then okay, I understand. But in that case, this would mean Keystone is copying the same arguably broken PM domain design from OMAP and it would be best not to propagate that idea.