Re: [PATCH 1/2] firmware: arm_scmi: Fix deadlock between reboot notifier and forceful work
From: Cristian Marussi
Date: Tue Nov 17 2026 - 12:46:11 EST
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.
Thanks,
Cristian