diff options
author | Mathieu Poirier <mathieu.poirier@linaro.org> | 2021-03-12 19:24:49 +0300 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2021-03-18 16:02:08 +0300 |
commit | 800dad0025ecb9ca8c885414cab070f8cc40e81e (patch) | |
tree | 8bb4bbfc58adb70479ae0ac1b5ddb1062b0ed16e /drivers/remoteproc | |
parent | 8088dd4d9316964901b13df09a20ee0f917f414d (diff) | |
download | linux-800dad0025ecb9ca8c885414cab070f8cc40e81e.tar.xz |
remoteproc: Properly deal with a kernel panic when attached
The panic handler operation of registered remote processors
should also be called when remote processors have been
attached to.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Link: https://lore.kernel.org/r/20210312162453.1234145-14-mathieu.poirier@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 163fad5b95a1..4cf6ef7e15b5 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -2733,7 +2733,11 @@ static int rproc_panic_handler(struct notifier_block *nb, unsigned long event, rcu_read_lock(); list_for_each_entry_rcu(rproc, &rproc_list, node) { - if (!rproc->ops->panic || rproc->state != RPROC_RUNNING) + if (!rproc->ops->panic) + continue; + + if (rproc->state != RPROC_RUNNING && + rproc->state != RPROC_ATTACHED) continue; d = rproc->ops->panic(rproc); |