From: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: aiqun.yu@oss.qualcomm.com, tingwei.zhang@oss.qualcomm.com,
trilok.soni@oss.qualcomm.com, yijie.yang@oss.qualcomm.com,
linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
Jingyi Wang <jingyi.wang@oss.qualcomm.com>
Subject: [PATCH v2 3/3] remoteproc: core: cancel crash_handler work in rproc_add() error path
Date: Tue, 19 May 2026 00:20:04 -0700 [thread overview]
Message-ID: <20260519-rproc-attach-issue-v2-3-caa1eaf75081@oss.qualcomm.com> (raw)
In-Reply-To: <20260519-rproc-attach-issue-v2-0-caa1eaf75081@oss.qualcomm.com>
Ensure crash_handler work is cancelled before tearing down rproc resources
to avoid accessing freed memory.
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
---
drivers/remoteproc/remoteproc_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 6e23cb11e515..abaa3786731b 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -2327,6 +2327,7 @@ int rproc_add(struct rproc *rproc)
return 0;
rproc_remove_dev:
+ cancel_work_sync(&rproc->crash_handler);
rproc_delete_debug_dir(rproc);
device_del(dev);
rproc_remove_cdev:
--
2.34.1
prev parent reply other threads:[~2026-05-19 7:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 7:20 [PATCH v2 0/3] remoteproc: improve robustness for rproc_attach fail cases Jingyi Wang
2026-05-19 7:20 ` [PATCH v2 1/3] remoteproc: core: Attach rproc asynchronously in rproc_add() path via schedule_work() Jingyi Wang
2026-05-19 7:20 ` [PATCH v2 2/3] remoteproc: core: Check subdev start status in rproc_stop() Jingyi Wang
2026-05-22 12:14 ` Stephan Gerhold
2026-05-28 3:31 ` Jingyi Wang
2026-05-19 7:20 ` Jingyi Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260519-rproc-attach-issue-v2-3-caa1eaf75081@oss.qualcomm.com \
--to=jingyi.wang@oss.qualcomm.com \
--cc=aiqun.yu@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=tingwei.zhang@oss.qualcomm.com \
--cc=trilok.soni@oss.qualcomm.com \
--cc=yijie.yang@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®