[PATCH v2 1/2] mailbox: zynqmp-ipi: Fix CPU hotplug state cleanup

Srivatsa S. Bhat srivatsa at csail.mit.edu
Wed Dec 2 02:43:29 PST 2026


On Wed, Dec 02, 2026 at 04:11:38PM +0530, Srivatsa S. Bhat wrote:
> Hi Prasanna,
> 
> On Mon, Nov 30, 2026 at 01:45:12AM -0800, Prasanna Kumar T S M wrote:
> > On driver removal, the CPUHP_AP_ONLINE_DYN CPU hotplug state is removed
> > instead of its actual state. This can leave the mailbox driver callbacks
> > dangling. Use the actual CPU hotplug state during driver removal.
> > 
> > Hotplug registration failures are also ignored, allowing probe to
> > succeed without the callbacks needed to enable interrupts on CPUs
> > brought online later.
> > 
> > This is found by code inspection.
> 
> Minor nit: This bit of detail doesn't feel necessary to capture in the commit
> message. On the other hand, if you had used a script or some automation tool
> (ex: coccinelle) to find such issues, its corresponding snippet would have been
> useful to include.
> > 
> > Fixes: 6ffb1635341b ("mailbox: zynqmp: handle SGI for shared IPI")
> > Cc: stable at vger.kernel.org
> > Signed-off-by: Prasanna Kumar T S M <ptsm at linux.microsoft.com>
> > ---
> >  drivers/mailbox/zynqmp-ipi-mailbox.c | 29 ++++++++++++++++++++--------
> >  1 file changed, 21 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c b/drivers/mailbox/zynqmp-ipi-mailbox.c
> > index 42d2583e44ca..843b5ecc905a 100644
> > --- a/drivers/mailbox/zynqmp-ipi-mailbox.c
> > +++ b/drivers/mailbox/zynqmp-ipi-mailbox.c
> > @@ -126,6 +126,7 @@ struct zynqmp_ipi_mbox {
> >   * @method:               IPI SMC or HVC is going to be used
> >   * @local_id:             local IPI agent ID
> >   * @virq_sgi:             IRQ number mapped to SGI
> > + * @hp_state:             CPU hotplug state for SGI callbacks
> >   * @num_mboxes:           number of mailboxes of this IPI agent
> >   * @ipi_mboxes:           IPI mailboxes of this IPI agent
> >   */
> 
> The hp_state variable appears to be only added to the comment, and not the
> actual zynqmp_ipi_pdata struct. So, how did this even build?
> 

Argh. Please ignore this comment, I missed reading the hunk right after this,
which adds the member to the struct. Sorry!

> > @@ -136,6 +137,7 @@ struct zynqmp_ipi_pdata {
> >  	unsigned int method;
> >  	u32 local_id;
> >  	int virq_sgi;
> > +	enum cpuhp_state hp_state;
> >  	int num_mboxes;
> >  	struct zynqmp_ipi_mbox ipi_mboxes[] __counted_by(num_mboxes);
> >  };

Regards,
Srivatsa



More information about the linux-arm-kernel mailing list