Re: [PATCH] accel/rocket: fix ignored return value in rocket_ioctl_submit

From: Daniel Drake

Date: Tue Nov 17 2026 - 09:27:21 EST


Hi,

On 10/05/2026 21:00, Kartik Nair wrote:
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.

There's definitely a bug in there, but this approach is just replacing one incorrect behaviour with another.

After your change if there is an -EINTR generated from within the job submission, this will cause drmIoctl to retry the exact same job sequence, likely causing parts of the sequence to be repeated, possibly with negative consequences.

And on other error paths that would be bubbled up by your change, userspace won't be able to know which parts of the sequence ran vs failed.

I think we need a deeper change here. Is it possible to fully prepare and arm the whole job list first, without executing yet, returning an error code if anything goes wrong in the process?

Then the execution of the job list could happen as a second stage, hopefully without any possibility of failure.

Daniel