Skip to content
Commit 5b53b2b4 authored by Cristian Marussi's avatar Cristian Marussi Committed by Greg Kroah-Hartman
Browse files

firmware: arm_scmi: Fix chan_free cleanup on SMC

[ Upstream commit d1ff11d7 ]

SCMI transport based on SMC can optionally use an additional IRQ to
signal message completion. The associated interrupt handler is currently
allocated using devres but on shutdown the core SCMI stack will call
.chan_free() well before any managed cleanup is invoked by devres.
As a consequence, the arrival of a late reply to an in-flight pending
transaction could still trigger the interrupt handler well after the
SCMI core has cleaned up the channels, with unpleasant results.

Inhibit further message processing on the IRQ path by explicitly freeing
the IRQ inside .chan_free() callback itself.

Fixes: dd820ee2

 ("firmware: arm_scmi: Augment SMC/HVC to allow optional interrupt")
Reported-by: default avatarBjorn Andersson <andersson@kernel.org>
Signed-off-by: default avatarCristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20230719173533.2739319-1-cristian.marussi@arm.com


Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6289d548
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment