From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: User readable error codes on atomic_ioctl failure
Date: Wed, 01 Apr 2026 07:55:26 +1000 [thread overview]
Message-ID: <review-overall-20260331-atomic-v11-0-6a1df7ec5af8@intel.com> (raw)
In-Reply-To: <20260331-atomic-v11-0-6a1df7ec5af8@intel.com>
Overall Series Review
Subject: User readable error codes on atomic_ioctl failure
Author: Arun R Murthy <arun.r.murthy@intel.com>
Patches: 8
Reviewed: 2026-04-01T07:55:26.976758
---
This v11 series adds user-readable error codes to `drm_atomic_ioctl()` by repurposing the `reserved` field in `struct drm_mode_atomic` as a pointer to a userspace `struct drm_mode_atomic_err_code`. The concept has value -- compositors currently get bare `-EINVAL` and must guess what went wrong. However, the implementation has **significant UAPI design issues, multiple bugs, typos in the ABI, and a memory leak** that need addressing before this can be merged.
**Key concerns:**
1. **Breaking the `reserved` field contract** -- The `reserved` field was previously validated to be zero, ensuring old kernels reject new userspace and vice versa. This patch silently removes that check, meaning old userspace that accidentally has garbage in `reserved` will now trigger `copy_to_user` to a random address instead of getting `-EINVAL`.
2. **Memory leak** in `drm_mode_atomic_add_error_msg()` -- `kvasprintf()` allocates memory that is never freed.
3. **Typos baked into UAPI** -- `DRM_MODE_ATTOMIC_*`, `VIOLOATION`, `invallid`, `falg` -- these become permanent ABI once merged.
4. **`error_code_ptr` used uninitialized** when `arg->reserved == 0` and an error occurs on a code path that was present before patch 4 moved allocation earlier.
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-31 21:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 9:03 [PATCH v11 0/7] User readable error codes on atomic_ioctl failure Arun R Murthy
2026-03-31 9:03 ` [PATCH v11 1/7] drm: Define user readable error codes for atomic ioctl Arun R Murthy
2026-03-31 21:55 ` Claude review: " Claude Code Review Bot
2026-03-31 9:03 ` [PATCH v11 2/7] drm/atomic: Add error_code element in atomic_state Arun R Murthy
2026-03-31 21:55 ` Claude review: " Claude Code Review Bot
2026-03-31 9:03 ` [PATCH v11 3/7] drm/atomic: Call complete_signaling only if prepare_signaling is done Arun R Murthy
2026-03-31 21:55 ` Claude review: " Claude Code Review Bot
2026-03-31 9:03 ` [PATCH v11 4/7] drm/atomic: Allocate atomic_state at the beginning of atomic_ioctl Arun R Murthy
2026-03-31 21:55 ` Claude review: " Claude Code Review Bot
2026-03-31 9:03 ` [PATCH v11 5/7] drm/atomic: Return user readable error in atomic_ioctl Arun R Murthy
2026-03-31 21:55 ` Claude review: " Claude Code Review Bot
2026-03-31 9:03 ` [PATCH v11 6/7] drm/i915/display: Error codes for async flip failures Arun R Murthy
2026-03-31 21:55 ` Claude review: " Claude Code Review Bot
2026-03-31 9:03 ` [PATCH v11 7/7] drm: Introduce DRM_CAP_ATOMIC_ERROR_REPORTING Arun R Murthy
2026-03-31 21:55 ` Claude review: " Claude Code Review Bot
2026-03-31 21:55 ` Claude Code Review Bot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-02-23 9:15 [PATCH v10 0/7] User readable error codes on atomic_ioctl failure Arun R Murthy
2026-02-24 0:26 ` Claude review: " Claude Code Review Bot
2026-02-10 9:03 [PATCH v9 0/7] " Arun R Murthy
2026-02-11 6:31 ` Claude review: " Claude Code Review Bot
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-20260331-atomic-v11-0-6a1df7ec5af8@intel.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