public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: accel/rocket: fix ignored return value in rocket_ioctl_submit
Date: Sat, 16 May 2026 16:08:43 +1000	[thread overview]
Message-ID: <review-patch1-20260510200047.6117-1-contact.kartikn@gmail.com> (raw)
In-Reply-To: <20260510200047.6117-1-contact.kartikn@gmail.com>

Patch Review

**Correctness: Good.** The fix correctly captures the return value of `rocket_ioctl_submit_job()` and breaks out of the loop on the first failure, propagating the error to userspace via the existing `exit` label.

The key code change:

```c
-	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;
+	}
```

**No resource leak concerns.** Looking at `rocket_ioctl_submit_job()` (line 533–588), it is fully self-contained with respect to resource management: on error, it cleans up the scheduler job and puts the job reference before returning. On success, the job is pushed to the scheduler and also properly ref-counted. So skipping subsequent jobs after a failure doesn't leak anything — the `jobs` array is just userspace-copied data (`struct drm_rocket_job` values), freed at the `exit` label via `kvfree(jobs)`.

**Pattern consistency.** The fix mirrors the error-handling style of the `copy_from_user` loop immediately above (lines 617–625), which also uses `goto exit` on failure. This is clean and consistent.

**Commit message.** Clear and accurate. Describes the problem (ignored return value, silent error), the consequence (success returned to userspace, inconsistent state), and the fix (propagate error, break on failure).

**Reviewed-by worthy.** No issues found. This is a straightforward, correct bugfix.

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-05-16  6:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-10 20:00 [PATCH] accel/rocket: fix ignored return value in rocket_ioctl_submit Kartik Nair
2026-05-16  6:08 ` Claude review: " Claude Code Review Bot
2026-05-16  6:08 ` Claude Code Review Bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=review-patch1-20260510200047.6117-1-contact.kartikn@gmail.com \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox