[PATCH v3 0/3] remoteproc: improve robustness for rproc_attach fail cases
From: Jingyi Wang
Date: Tue Jun 23 2026 - 05:07:10 EST
Failure in rproc_attach() path can cause issues like NULL pointer
dereference when doing recovery and rproc_add() fail, improve the
robustness for rproc_attach fail cases.
Signed-off-by: Jingyi Wang <jingyi.wang@xxxxxxxxxxxxxxxx>
---
Changes in v3:
- update and check subdevs_started flag in rproc_start_subdevices()/rproc_stop_subdevices()
- Link to v2: https://lore.kernel.org/r/20260519-rproc-attach-issue-v2-0-caa1eaf75081@xxxxxxxxxxxxxxxx
Changes in v2:
- commit msg update
- Introduce subdevs_started flag instead of check nullptr
- Add change to cancel crash_handler work
- Link to v1: https://lore.kernel.org/r/20260409-rproc-attach-issue-v1-0-088a1c348e7a@xxxxxxxxxxxxxxxx
---
Jingyi Wang (3):
remoteproc: core: Attach rproc asynchronously in rproc_add() path via schedule_work()
remoteproc: qcom: Check subdev start status in rproc_stop()
remoteproc: core: cancel crash_handler work in rproc_add() error path
drivers/remoteproc/remoteproc_core.c | 28 ++++++++++++++++++++--------
include/linux/remoteproc.h | 4 ++++
2 files changed, 24 insertions(+), 8 deletions(-)
---
base-commit: 4fa3f5fabb30bf00d7475d5a33459ea83d639bf9
change-id: 20260623-rproc-attach-issue-a0adafa203b8
Best regards,
--
Jingyi Wang <jingyi.wang@xxxxxxxxxxxxxxxx>