From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/atomic: don't set colorop properties of inactive color pipelines Date: Thu, 07 May 2026 13:05:38 +1000 Message-ID: In-Reply-To: <20260506192633.16066-3-mwen@igalia.com> References: <20260506192633.16066-1-mwen@igalia.com> <20260506192633.16066-3-mwen@igalia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Assessment: Good, one concern about goto label scope** This patch adds validation in `drm_atomic_set_property()` to reject attempts to set properties on colorops that are not part of the currently active color pipeline. The logic is straightforward: ```c plane_state = drm_atomic_get_plane_state(state, colorop->plane); ... for (active_colorop = plane_state->color_pipeline; active_colorop; active_colorop = active_colorop->next) { if (active_colorop == colorop) { colorop_state = drm_atomic_get_colorop_state(state, colorop); ... break; } } if (!colorop_state) { ... ret = -EINVAL; goto err; } ``` **Concern**: The `err:` label is added *after* the closing brace of the `default:` case and before the common cleanup code `drm_property_change_valid_put(prop, ref)`. This means that `goto err` from the COLOROP case will still correctly call `drm_property_change_valid_put()`, which is the intended behavior. However, the label is structurally placed outside the switch statement, which means any future code adding error paths in *other* cases might accidentally use this label. This isn't a bug today, but the asymmetry (only the COLOROP case uses `goto err`, all other cases use `break`) is worth noting. An alternative would be to set `ret = -EINVAL` and `break` instead of `goto err`, since both paths end up at `drm_property_change_valid_put()` anyway. **Observation**: The call to `drm_atomic_get_plane_state()` here means that any userspace attempt to set a colorop property will also pull in the plane state, even if the set ultimately fails. This is a new side effect but probably fine since plane state is cheap and necessary for the validation. --- Generated by Claude Code Patch Reviewer