On Mon, Aug 19, 2024, Krishna Kurapati wrote: > > > On 8/8/2024 5:35 PM, Selvarasu Ganesan wrote: > > This commit addresses an issue where the USB core could access an > > invalid event buffer address during runtime suspend, potentially causing > > SMMU faults and other memory issues. The problem arises from the > > following sequence. > > 1. In dwc3_gadget_suspend, there is a chance of a timeout when > > moving the USB core to the halt state after clearing the > > run/stop bit by software. > > 2. In dwc3_core_exit, the event buffer is cleared regardless of > > the USB core's status, which may lead to an SMMU faults and > > other memory issues. if the USB core tries to access the event > > buffer address. > > > > To prevent this issue, this commit ensures that the event buffer address > > is not cleared by software when the USB core is active during runtime > > suspend by checking its status before clearing the buffer address. > > > > Cc: stable@xxxxxxxxxxxxxxx > > Fixes: 89d7f9629946 ("usb: dwc3: core: Skip setting event buffers for host only controllers") > > I don't think the fixes tag is right. > > This fix is independent of whether controller is host only capable or not. > This is fixing the original commit that introduced the cleanup call. > You're reviewing outdated patch. This was brought up to attention prior[*]. The latest patch is v3, which does not have this Fixes tag. [*] https://lore.kernel.org/linux-usb/8526e46f-30f2-4f24-8874-624b66aa54b1@xxxxxxxxxxx/T/#m7244209bc610c592ff91ffc72cb5acad2b2ff9ac Thanks, Thinh