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-subtle-cornflower-guppy-b64a03@sudeepholla> |
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. -- Regards, Sudeep [1] https://lore.kernel.org/all/[email protected]