[PATCH 1/2] firmware: arm_scmi: Fix deadlock between reboot notifier and forceful work

Sudeep Holla sudeep.holla at kernel.org
Tue Nov 17 06:06:04 PST 2026


On Tue, Nov 17, 2026 at 11:25:23AM +0000, Cristian Marussi wrote:
> On Mon, Nov 16, 2026 at 06:25:52PM +0000, Sudeep Holla wrote:

[...]

> > > @@ -188,13 +197,16 @@ static void scmi_forceful_work_func(struct work_struct *work)
> > >  	dwork = to_delayed_work(work);
> > >  	sc = dwork_to_sconf(dwork);
> > >  
> > > -	dev_dbg(sc->dev, "Graceful request timed out...forcing !\n");
> > >  	mutex_lock(&sc->state_mtx);
> > > -	/* avoid deadlock by unregistering reboot notifier first */
> > > -	unregister_reboot_notifier(&sc->reboot_nb);
> > > -	if (sc->state == SCMI_SYSPOWER_IN_PROGRESS)
> > > -		scmi_request_forceful_transition(sc);
> > > +	needs_forceful = sc->state == SCMI_SYSPOWER_IN_PROGRESS;
> > >  	mutex_unlock(&sc->state_mtx);
> > > +
> > > +	if (needs_forceful) {
> > > +		dev_dbg(sc->dev, "Graceful request timed out...forcing !\n");
> > > +		/* avoid deadlock by unregistering reboot notifier first */
> > > +		unregister_reboot_notifier(&sc->reboot_nb);
> > 
> > And re-evaluate needs_forceful again here after un-registration before
> > calling below forced transition ?
> >
> 
> If all of this is locked as it was originally there is no need, the two
> threads should just sync properly...
> 

Fair enough!

> Let's see what Sashiko thinks..

🤞

-- 
Regards,
Sudeep



More information about the linux-arm-kernel mailing list