Skip to content

remoteproc: improve robustness for rproc_attach fail cases

Jingyi Wang linux-remoteproc lkml 3 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected] change-id 20260409-rproc-attach-issue-2e3290d6d013

Versions newest first · linked by author and title

  1. v3 Latest3 patches 1 replyApplied
  2. v23 patches 2 repliesSuperseded
  3. v12 patches 9 repliesSuperseded

Changes in v3 from the cover letter

- update and check subdevs_started flag in rproc_start_subdevices()/rproc_stop_subdevices()
- Link to v2: https://lore.kernel.org/r/[email protected]

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/3remoteproc: core: Attach rproc asynchronously in rproc_add() path via schedule_work()drivers/remoteproc/remoteproc_core.c include/linux/remoteproc.h+14 -80 replies
2/3remoteproc: qcom: Check subdev start status in rproc_stop()drivers/remoteproc/remoteproc_core.c include/linux/remoteproc.h+9 -00 replies
3/3remoteproc: core: cancel crash_handler work in rproc_add() error pathdrivers/remoteproc/remoteproc_core.c+1 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/3] remoteproc: improve robustness for rproc_attach fail cases

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.

---
Changes in v3:
- update and check subdevs_started flag in rproc_start_subdevices()/rproc_stop_subdevices()
- Link to v2: https://lore.kernel.org/r/[email protected]

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/[email protected]

---
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,

Signature · 1 line
Jingyi Wang <[email protected]>