linux/drivers/power/sequencing
Ziyi Guo 9da857e6b5 power: sequencing: fix missing state_lock in pwrseq_power_on() error path
[ Upstream commit e1dccb485c ]

pwrseq_power_on() calls pwrseq_unit_disable() when the
post_enable callback fails. However, this call is outside the
scoped_guard(mutex, &pwrseq->state_lock) block that ends.

pwrseq_unit_disable() has lockdep_assert_held(&pwrseq->state_lock),
which will fail when called from this error path.

Add the scoped_guard block to cover the post_enable callback and its
error handling to ensure the lock is held when pwrseq_unit_disable() is
called.

Signed-off-by: Ziyi Guo <n7l8m4@u.northwestern.edu>
Link: https://patch.msgid.link/20260130182651.1576579-1-n7l8m4@u.northwestern.edu
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-04 07:20:07 -05:00
..
core.c power: sequencing: fix missing state_lock in pwrseq_power_on() error path 2026-03-04 07:20:07 -05:00
Kconfig power: sequencing: extend build coverage with COMPILE_TEST=y 2025-06-30 09:06:54 +02:00
Makefile power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver 2025-06-24 15:55:05 +02:00
pwrseq-qcom-wcn.c power: sequencing: qcom-wcn: fix bluetooth-wifi copypasta for WCN6855 2025-06-30 09:07:57 +02:00
pwrseq-thead-gpu.c power: sequencing: thead-gpu: use new defines for match() return values 2025-06-30 09:07:41 +02:00