Commit ba080c82 authored by Bjorn Andersson's avatar Bjorn Andersson Committed by Xie XiuQi
Browse files

remoteproc: sysmon: Ensure remote notification ordering



stable inclusion
from stable-5.10.4
commit 450fc74de129155efee7f8c77a83d2823fdecb0e
bugzilla: 46903

--------------------------------

commit 138a6428 upstream.

The reliance on the remoteproc's state for determining when to send
sysmon notifications to a remote processor is racy with regard to
concurrent remoteproc operations.

Further more the advertisement of the state of other remote processor to
a newly started remote processor might not only send the wrong state,
but might result in a stream of state changes that are out of order.

Address this by introducing state tracking within the sysmon instances
themselves and extend the locking to ensure that the notifications are
consistent with this state.

Fixes: 1f36ab3f ("remoteproc: sysmon: Inform current rproc about all active rprocs")
Fixes: 1877f54f ("remoteproc: sysmon: Add notifications for events")
Fixes: 1fb82ee8 ("remoteproc: qcom: Introduce sysmon")
Cc: stable@vger.kernel.org
Reviewed-by: default avatarRishabh Bhatnagar <rishabhb@codeaurora.org>
Link: https://lore.kernel.org/r/20201122054135.802935-2-bjorn.andersson@linaro.org


Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent 0d0ca366
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment