From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/gem: Try to fix change_handle ioctl, attempt 4
Date: Fri, 05 Jun 2026 06:00:21 +1000 [thread overview]
Message-ID: <review-overall-20260604191916.1713387-1-simona.vetter@ffwll.ch> (raw)
In-Reply-To: <20260604191916.1713387-1-simona.vetter@ffwll.ch>
Overall Series Review
Subject: drm/gem: Try to fix change_handle ioctl, attempt 4
Author: Simona Vetter <simona.vetter@ffwll.ch>
Patches: 3
Reviewed: 2026-06-05T06:00:21.529702
---
This mbox contains two versions (v1 and v2) of the same single patch. The v2 supersedes v1, with the key change being the use of `IS_ERR_OR_NULL()` instead of `!obj` for the `idr_replace()` return value check — a critical fix since `idr_replace()` returns `ERR_PTR(-ENOENT)` for non-existent IDs, not NULL.
The patch addresses a genuinely tangled mess: three stacked bugfix commits (`5e28b7b94408`, `7164d78559b0`, `dc366607c41c`) each partially wrong due to confusing variable naming (`handle` actually meant `new_handle`). The approach is sound — it rebuilds the function using the two established patterns from the same file:
1. **`drm_gem_handle_delete`'s pattern**: `idr_replace(NULL, handle)` to atomically grab the object and NULL out the old slot
2. **`drm_gem_handle_create_tail`'s pattern**: `idr_alloc(NULL, ...)` then later `idr_replace(obj, ...)` for the two-stage allocation
Disabling the ioctl via `drm_invalid_op` until IGT tests and consensus are in place is a reasonable defensive measure given the history of repeated incorrect fixes.
The v2 patch is **correct** and significantly cleaner than the existing code. I have only minor observations below.
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-06-04 20:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 19:19 [PATCH] drm/gem: Try to fix change_handle ioctl, attempt 4 Simona Vetter
2026-06-04 19:29 ` sashiko-bot
2026-06-04 19:44 ` Simona Vetter
2026-06-04 19:58 ` sashiko-bot
2026-06-04 20:00 ` 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-overall-20260604191916.1713387-1-simona.vetter@ffwll.ch \
--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