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

Sudeep Holla sudeep.holla at kernel.org
Tue Nov 17 10:27:52 PST 2026


On Tue, Nov 17, 2026 at 05:46:00PM +0000, Cristian Marussi wrote:
> On Wed, Nov 18, 2026 at 01:35:04AM +0800, Chengyu Liu wrote:
> > Hi,
> > 
> > I think the current v2 may have reintroduced the second deadlock
> > described in my original commit message.
> > 
> > scmi_forceful_work_func() still calls unregister_reboot_notifier()
> > while holding sc->state_mtx. Could you also check the potential lock
> > inversion between state_mtx and reboot_notifier_list.rwsem?
> > 
> > The reboot path holds the rwsem read lock while executing the notifier
> > callback, which then waits for state_mtx. Meanwhile, the worker holds
> > state_mtx while trying to unregister the notifier, which requires the
> > rwsem write lock.
> 
> Yes indeed Sashiko complains about the same and the second part of the
> issue on the rwsem is unresolved and will need more work.
> 

That's what I was referring when I said
" ... re-evaluate needs_forceful again here after un-registration before
  calling below forced transition ?"

But then your response somehow convinced me that it is not needed 😉.

-- 
Regards,
Sudeep



More information about the linux-arm-kernel mailing list