Re: [PATCH 08/10] mailbox: sun6i-msgbox: Synchronise IRQ during channel shutdown

From
Chen-Yu Tsai <wens@kernel.org>
Date
2026-12-03 13:50:13
Also in
linux-sunxi, lkml, stable
Reply to
Lee Jones, 2026-12-03
On Thu, Dec 3, 2026 at 5:28 PM Lee Jones [off-list ref] wrote:
sun6i_msgbox_shutdown() disables the channel receive interrupt and
immediately flushes the receive FIFO and returns to mbox_free_channel()
without waiting for an already-executing sun6i_msgbox_irq() on another
CPU.  Both contexts can concurrently read MSG_DATA_REG(n) and underflow
the FIFO, and the ISR can invoke mbox_chan_received_data() after the
client is torn down.

Call synchronize_irq(mbox->irq) after disabling the channel receive
interrupt and before flushing the FIFO.

Fixes: 25831c44b0b7 ("mailbox: sun6i-msgbox: Add a new mailbox driver")
Closes: https://sashiko.dev/#/bug/linux-bdac10dc-aab3-41b2-a13a-eb012e1fd2f9
Cc: <redacted>
Signed-off-by: Lee Jones <lee@kernel.org>
Reviewed-by: Chen-Yu Tsai <wens@kernel.org>
Thread (5 messages) 5 messages, 2 authors, last reply 17h ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help