summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorRunyu Xiao <runyu.xiao@seu.edu.cn>2026-08-18 18:12:01 +0800
committerMathieu Poirier <mathieu.poirier@linaro.org>2026-08-31 11:34:41 -0600
commit5ca7dea7cb2e47f42c15ac7206c5e0cba23d292d (patch)
tree937769f219d661ec18af052f2f2f31895dffea02 /scripts/Makefile.thinlto
parent3604f43fd2f83c170361849198d1c49d63d9feb6 (diff)
downloadlinux-next-5ca7dea7cb2e47f42c15ac7206c5e0cba23d292d.tar.gz
linux-next-5ca7dea7cb2e47f42c15ac7206c5e0cba23d292d.zip
remoteproc: xlnx: Initialize mailbox work before requesting channels
zynqmp_r5_setup_mbox() installs zynqmp_r5_mb_rx_cb() as the mailbox RX callback before requesting the mailbox channels, but initializes ipi->mbox_work only after both channels have been requested. Once the RX channel is active, a notification delivered before the late INIT_WORK() would make the callback queue an uninitialized work item. Initialize the work item before requesting channels. Also drain the work before freeing the mailbox state, after the channels have been released so no new callbacks can queue it. Use the same drain before freeing ipi from the channel request error paths, since the callback is already published there as well. This issue was found by our static analysis tool and then confirmed by manual review of the mailbox setup sequence. The callback is published before the channel requests complete, so the work item should be ready before the mailbox provider can invoke it. A QEMU PoC modeled a mailbox notification delivered after the RX callback became reachable but before the delayed INIT_WORK(). DEBUG_OBJECTS reported queueing an uninitialized work item from the zynqmp_r5_setup_mbox() path. This is sent as an RFC because the practical trigger depends on the ZynqMP IPI mailbox provider and firmware delivery timing. If the provider cannot invoke the RX callback until after setup returns, this is a defensive lifecycle cleanup rather than a reachable race on current systems. Fixes: 5dfb28c257b7 ("remoteproc: xilinx: Add mailbox channels for rpmsg") Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn> Link: https://lore.kernel.org/r/20260818101201.1603947-1-runyu.xiao@seu.edu.cn Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions