[PATCH 0/2] soc: xilinx: zynqmp_power: order callback state against probe
Jaidev Shastri via B4 Relay
devnull+jaidevshastri.vt.edu at kernel.org
Mon Sep 21 18:02:32 PDT 2026
zynqmp_pm_probe() registers the event manager callbacks and the mailbox rx
callback before it has finished storing the state those callbacks read.
The first patch closes a real window. mbox_request_channel_byname() starts
the channel before it returns, so a message the firmware already has pending
is delivered while rx_chan is still NULL and the IPI is never acknowledged.
The mailbox API gives the callback no way to reach the channel from its
struct mbox_client, so the channel is stored under a spinlock shared with the
callback and the acknowledgement is deferred until probe has published it.
The second orders the two work-struct pointers that the event manager and
mailbox callbacks dereference as soon as they run.
Found with MBCheck, a static herd7-based memory consistency checker.
Compile-tested on arm64 with W=1, no new warnings.
---
Jaidev Shastri (2):
soc: xilinx: zynqmp_power: do not use rx_chan before probe has stored it
soc: xilinx: zynqmp_power: publish the callback work pointers
drivers/soc/xilinx/zynqmp_power.c | 113 +++++++++++++++++++++++++++-----------
1 file changed, 81 insertions(+), 32 deletions(-)
---
base-commit: 93f51579e7df248780214094418f205253383cc5
change-id: 20260921-mb-zynqmp-power-34da13724341
Best regards,
--
Jaidev Shastri <jaidevshastri at vt.edu>
More information about the linux-arm-kernel
mailing list