]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
firmware: arm_ffa: Keep framework RX release under lock
authorSudeep Holla <sudeep.holla@kernel.org>
Tue, 28 Apr 2026 18:33:31 +0000 (19:33 +0100)
committerSudeep Holla <sudeep.holla@kernel.org>
Tue, 5 May 2026 15:42:48 +0000 (16:42 +0100)
commit2af18f8e36b277730527cacc2256b1332f56aa28
tree60d01488e7c79e6c2ae13c97bd0061525a136541
parent3974ea1938406f9bfa7c1f48d4e43533f447bb08
firmware: arm_ffa: Keep framework RX release under lock

The framework notification handler drops rx_lock before issuing
FFA_RX_RELEASE, leaving a window where another RX-buffer user can
start a new FF-A transaction before ownership has actually been
returned to firmware.

Move the FFA_RX_RELEASE calls so they execute while rx_lock is still
held on both the kmemdup() failure path and the normal success path.
While doing that, switch the handler to scoped_guard() to keep the
critical section explicit.

Fixes: 285a5ea0f542 ("firmware: arm_ffa: Add support for handling framework notifications")
Link: https://patch.msgid.link/20260428-ffa_fixes-v2-7-8595ae450034@kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
drivers/firmware/arm_ffa/driver.c