Skip to content

accel/rocket: Fix allocation handling and scheduler array leak

Triet Hoang dri-devel lkml 7 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest2 patches 3 repliesApplied
  2. v52 patches 6 repliesSuperseded
  3. v42 patches 5 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v3 posting 2/21 patch0 repliesSuperseded
v3 posting 1/21 patch1 replySuperseded
v21 patch7 repliesSuperseded
v11 patch0 repliesSuperseded

Changes in v6 from the cover letter

- Rebase on top of drm-misc-next (base commit 5052ea2e6bfc43c64b851c596d3675d17e05e631)
- Addressed review feedback from previous iterations.
- Added Fixes and Tested-by tags where applicable.

Patches in v6 Applied

#Subject and filesSizeRepliesApplied
1/2accel/rocket: Check allocations before usedrivers/accel/rocket/rocket_job.c+6 -31 reply
2/2drm/rocket: Keep scheduler allocation in rocket_file_privdrivers/accel/rocket/rocket_drv.h drivers/accel/rocket/rocket_job.c+4 -11 reply

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchIgor PaunovicSidong Yang
1/2T-b T-b T-b
2/2T-b T-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/2] accel/rocket: Fix allocation handling and scheduler array leak

This small series addresses allocation and memory management issues in the accel/rocket driver:

1. Patch 1 ensures proper allocation checks before using pointers in rocket_job_open()
2. Patch 2 fixes an unreachable memory leak of the scheduler array when running on single-core setups (e.g., num_cores == 1), where drm_sched_entity_init() drops the array pointer.

Link to v5: https://lore.kernel.org/all/[email protected]/

Changes in v6:
- Rebase on top of drm-misc-next (base commit 5052ea2e6bfc43c64b851c596d3675d17e05e631)
- Addressed review feedback from previous iterations.
- Added Fixes and Tested-by tags where applicable.

Triet Hoang (2):
drm/rocket: Check allocations before use drm/rocket: Keep scheduler allocation in rocket_file_priv

 drivers/accel/rocket/rocket_drv.h |  1 +
 drivers/accel/rocket/rocket_job.c | 13 +++++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)
Signature · 1 line
2.53.0