* [PATCH] accel/rocket: fix ignored return value in rocket_ioctl_submit
@ 2026-05-10 20:00 Kartik Nair
0 siblings, 0 replies; only message in thread
From: Kartik Nair @ 2026-05-10 20:00 UTC (permalink / raw)
To: tomeu, ogabbay; +Cc: dri-devel, linux-kernel, Kartik Nair
rocket_ioctl_submit() calls rocket_ioctl_submit_job() in a loop but
ignores its return value. If any job submission fails, the error is
silently dropped and the function returns 0 (success) to userspace,
leaving subsequent jobs potentially in an inconsistent state.
Fix this by propagating the error and breaking out of the loop on
the first failure.
Signed-off-by: Kartik Nair <contact.kartikn@gmail.com>
---
drivers/accel/rocket/rocket_job.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/accel/rocket/rocket_job.c b/drivers/accel/rocket/rocket_job.c
index ac51bff39..abac26853 100644
--- a/drivers/accel/rocket/rocket_job.c
+++ b/drivers/accel/rocket/rocket_job.c
@@ -626,8 +626,11 @@ int rocket_ioctl_submit(struct drm_device *dev, void *data, struct drm_file *fil
}
- for (i = 0; i < args->job_count; i++)
- rocket_ioctl_submit_job(dev, file, &jobs[i]);
+ for (i = 0; i < args->job_count; i++) {
+ ret = rocket_ioctl_submit_job(dev, file, &jobs[i]);
+ if (ret)
+ goto exit;
+ }
exit:
kvfree(jobs);
--
2.50.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-10 20:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-10 20:00 [PATCH] accel/rocket: fix ignored return value in rocket_ioctl_submit Kartik Nair
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox