public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: Rockchip DRM use-after-free & null-ptr-deref fixes
Date: Thu, 04 Jun 2026 13:55:04 +1000	[thread overview]
Message-ID: <review-overall-20260601-drm-rk-fixes-v4-0-c3f3f123e1da@collabora.com> (raw)
In-Reply-To: <20260601-drm-rk-fixes-v4-0-c3f3f123e1da@collabora.com>

Overall Series Review

Subject: Rockchip DRM use-after-free & null-ptr-deref fixes
Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Patches: 7
Reviewed: 2026-06-04T13:55:04.889679

---

This is a clean 3-patch fix series addressing a real use-after-free bug in the Rockchip DW DP driver. The KASAN splat in patch 3's commit message confirms the issue is reproducible. The approach is sound: patch 1 adds the cleanup primitive to the core library, patch 2 is a trivial cosmetic fix, and patch 3 wires up the cleanup in the platform driver's bind error path and unbind callback. The series is well-structured with correct ordering of dependencies between patches.

The core issue is that `drm_dp_aux_register()` in `dw_dp_bind()` (line 2051 of `dw-dp.c`) is the only resource allocation in that function that is **not** managed by devres — all other resources use `devm_*` variants. Without an explicit unregister, the AUX adapter leaks or triggers use-after-free on module unload/reload.

One question worth considering: could `dw_dp_bind()` use `devm_add_action_or_reset()` to register `drm_dp_aux_unregister` as a devres action instead, eliminating the need for a separate `dw_dp_unbind()` entirely? That would follow the pattern already used for `phy_exit()` at line 2071. However, the current approach is also valid and gives the caller explicit control over cleanup ordering.

The series looks correct and ready to merge. No bugs found.

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-06-04  3:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 16:13 [PATCH v4 0/3] Rockchip DRM use-after-free & null-ptr-deref fixes Cristian Ciocaltea
2026-06-01 16:13 ` [PATCH v4 1/3] drm/bridge: synopsys: dw-dp: Support unregistering the AUX channel Cristian Ciocaltea
2026-06-04  3:55   ` Claude review: " Claude Code Review Bot
2026-06-01 16:13 ` [PATCH v4 2/3] drm/rockchip: dw_dp: Add missing newline in dev_err_probe() message Cristian Ciocaltea
2026-06-03 13:01   ` Andy Yan
2026-06-04  3:55   ` Claude review: " Claude Code Review Bot
2026-06-01 16:13 ` [PATCH v4 3/3] drm/rockchip: dw_dp: Release core resources Cristian Ciocaltea
2026-06-03 13:03   ` Andy Yan
2026-06-04  3:55   ` Claude review: " Claude Code Review Bot
2026-06-02 19:31 ` [PATCH v4 0/3] Rockchip DRM use-after-free & null-ptr-deref fixes Heiko Stuebner
2026-06-04  3:55 ` Claude Code Review Bot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-03-09 22:44 [PATCH v2 0/8] " Cristian Ciocaltea
2026-03-10  1:47 ` 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-20260601-drm-rk-fixes-v4-0-c3f3f123e1da@collabora.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