Commit 18126b26 authored by Cristian Marussi's avatar Cristian Marussi Committed by Lee Jones
Browse files

UPSTREAM: firmware: arm_scmi: Fix chan_free cleanup on SMC



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.

Bug: 254441685
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>
(cherry picked from commit d1ff11d7)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I9996056d3dddd9b208de7e5afb5aa3d345325e01
parent 2d2a6139
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment