remoteproc: Traverse rproc_list under RCU read lock
authorBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 24 Mar 2020 05:29:01 +0000 (22:29 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 26 Mar 2020 05:29:44 +0000 (22:29 -0700)
commitc0abe2ca3605e4c4fb25bf69d0218c63baf71d2b
tree200afc104f4c75b015d53ed481b020eea129d485
parent791c13b709dd51eb37330f2a5837434e90c87c27
remoteproc: Traverse rproc_list under RCU read lock

In order to be able to traverse the mostly read-only rproc_list without
locking during panic migrate traversal to be done under rcu_read_lock().

Mutual exclusion for modifications of the list continues to be handled
by the rproc_list_mutex and a synchronization point is added before
releasing objects that are popped from the list.

Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20200324052904.738594-2-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/remoteproc_core.c