From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: Rockchip DRM use-after-free & null-ptr-deref fixes Date: Tue, 10 Mar 2026 11:47:00 +1000 Message-ID: In-Reply-To: <20260310-drm-rk-fixes-v2-0-645ecfb43f49@collabora.com> References: <20260310-drm-rk-fixes-v2-0-645ecfb43f49@collabora.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: Rockchip DRM use-after-free & null-ptr-deref fixes Author: Cristian Ciocaltea Patches: 9 Reviewed: 2026-03-10T11:47:00.922269 --- This is a well-structured 8-patch series fixing real use-after-free and null-ptr-deref bugs in Rockchip DRM drivers (inno-hdmi, dw_dp, dw_hdmi_qp) and the DW DP bridge library. The first three patches are genuine fixes with appropriate `Fixes:` tags, patches 4-6 are minor cleanups/improvements, and patches 7-8 address issues in the bridge-level dw-dp code. The core insight is correct: when a component driver uses `devm_kzalloc()` for a structure that embeds a `drm_encoder` initialized via `drmm_encoder_init()`, the devm teardown (during component unbind) frees the memory before the drm-managed cleanup runs (during `drm_dev_put()`), causing use-after-free. Switching to `drmm_kzalloc()` aligns the lifetime of the allocation with the DRM device. The series looks good overall and should be safe to merge. --- Generated by Claude Code Patch Reviewer