Re: [PATCH] mailbox: pcc: Synchronize channel IRQ before unmapping shared memory
Sudeep Holla <[email protected]>
| Newsgroups | org.kernel.vger.linux-acpi,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <20260903-just-crane-of-gallantry-adb81a@sudeepholla> |
On Thu, Sep 03, 2026 at 10:51:28AM +0100, Christian Loehle wrote: > On 9/3/26 10:10, Sudeep Holla wrote: > > On Thu, Sep 03, 2026 at 10:03:38AM +0100, Sudeep Holla wrote: > >> On Fri, Aug 28, 2026 at 05:10:33PM +0100, Christian Loehle wrote: > >>> pcc_mbox_free_channel() unmaps the PCC shared-memory region before > >>> mbox_free_channel() invokes the controller shutdown callback. For > >>> interrupt-capable extended subspaces, an in-flight handler may > >>> consequently access the mapping after it has been invalidated. > >>> > >>> Release the mailbox channel first so its IRQ is disabled and synchronized > >>> before unmapping the shared-memory region. Serialize PCC channel > >>> acquisition and release across this sequence: once mbox_free_channel() > >>> makes the channel available, another client must not replace the > >>> shared-memory mapping until the old one has been unmapped. > >>> > >> > >> Breno Leitao has already posted the fix for the unmapping before freeing > >> the channel. You just need the mutex guards. > >> > > > > Failed to add the reference to it [1] earlier. > > > > Thanks, I didn't see that. > I guess I'll wait until Breno's patch hits linux-next > or linus' tree and rebase? > No just post it with a dependency mention. Both can go together IMO. -- Regards, Sudeep