diff options
| author | Shuvam Pandey <shuvampandey1@gmail.com> | 2026-07-01 10:15:52 -0700 |
|---|---|---|
| committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2026-07-04 10:24:46 +0200 |
| commit | 70e6a33d68a9b03335c5426332666e52d07f45d6 (patch) | |
| tree | 3e8cb6522ecb7c4bdfd4c5ab1e12f60809d68db0 /tools/perf/scripts/python/flamegraph.py | |
| parent | 49d0307c55c4f713bf9515e6ef52ed0942cea27d (diff) | |
accel/rocket: initialize job domain before cleanup paths
rocket_ioctl_submit_job() releases rjob through rocket_job_put() on
allocation error paths. rocket_job_cleanup() unconditionally calls
rocket_iommu_domain_put(job->domain), but job->domain is assigned only
after task copying and BO lookups. A failure before that assignment can
therefore clean up a job with a NULL domain pointer.
Take the per-file domain reference before the first error path can release
rjob. Also clear rjob->tasks after freeing it in rocket_copy_tasks(), so
the common cleanup path cannot free the task array again after a task-copy
error.
Fixes: 0810d5ad88a1 ("accel/rocket: Add job submission IOCTL")
Cc: stable@vger.kernel.org
Signed-off-by: Shuvam Pandey <shuvampandey1@gmail.com>
Link: https://lore.kernel.org/r/6a454b48.6a8fa39a.27019b.984b@mx.google.com
Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
