lkml.org 
[lkml]   [2020]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 13/13] remoteproc: Properly deal with a kernel panic when attached
Date
> Subject: [PATCH 13/13] 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>
> ---
> drivers/remoteproc/remoteproc_core.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/remoteproc/remoteproc_core.c
> b/drivers/remoteproc/remoteproc_core.c
> index 5586582f54c5..54b5e3437ab5 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -2491,7 +2491,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);
> --

Reviewed-by: Peng Fan <peng.fan@nxp.com>

\
 
 \ /
  Last update: 2020-10-15 04:28    [W:0.157 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site