From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260331-atomic-v11-0-6a1df7ec5af8@intel.com> References: <20260331-atomic-v11-0-6a1df7ec5af8@intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: User readable error codes on atomic_ioctl failure Author: Arun R Murthy 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