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: drm/i915/display/intel_sdvo: Fix double connector destroy in error paths
Date: Thu, 04 Jun 2026 11:52:28 +1000	[thread overview]
Message-ID: <review-patch1-20260603-fix_i915-v1-1-7479ff64e705@bootlin.com> (raw)
In-Reply-To: <20260603-fix_i915-v1-1-7479ff64e705@bootlin.com>

Patch Review

**Verdict: Correct.**

The analysis is sound. Looking at the code:

1. `intel_sdvo_connector_init()` calls `drm_connector_init_with_ddc()` with `intel_sdvo_connector_funcs`, which has `.destroy = intel_connector_destroy` (line 2514 of `intel_sdvo.c`).

2. Once `drm_connector_init_with_ddc()` succeeds, the connector is registered with the DRM core.

3. In `intel_sdvo_tv_init()` and `intel_sdvo_lvds_init()`, the `err:` labels call `intel_connector_destroy(connector)` explicitly, but the DRM core will also invoke it via the `.destroy` callback — a genuine double-free.

4. The caller `intel_sdvo_output_setup()` at line 3049 returns false on failure, and the cleanup path at `intel_sdvo_output_cleanup()` (line 3058) iterates all connectors attached to this encoder and calls `intel_connector_destroy()` on each — so the cleanup IS handled properly by the caller.

The fix to just `return false` is correct. No concerns.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-06-04  1:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03  8:59 [PATCH 0/3] drm/i915: Fix double cleanup in error paths Kory Maincent
2026-06-03  8:59 ` [PATCH 1/3] drm/i915/display/intel_sdvo: Fix double connector destroy " Kory Maincent
2026-06-04  1:52   ` Claude Code Review Bot [this message]
2026-06-03  8:59 ` [PATCH 2/3] drm/i915/display/intel_lvds: Drop redundant manual cleanup on init failure Kory Maincent
2026-06-04  1:52   ` Claude review: " Claude Code Review Bot
2026-06-03  8:59 ` [PATCH 3/3] drm/i915/display/intel_dp: Drop redundant intel_dp_aux_fini() " Kory Maincent
2026-06-03 11:58   ` Imre Deak
2026-06-04  1:52   ` Claude review: " Claude Code Review Bot
2026-06-03 16:35 ` [PATCH 0/3] drm/i915: Fix double cleanup in error paths Kory Maincent
2026-06-04  1:52 ` Claude review: " Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-04-09 17:08 [PATCH RFC 00/12] Add support for DisplayPort link training information report Kory Maincent
2026-04-09 17:08 ` [PATCH RFC 01/12] drm/i915/display/intel_sdvo: Fix double connector destroy in error paths Kory Maincent
2026-04-12  0:51   ` 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-patch1-20260603-fix_i915-v1-1-7479ff64e705@bootlin.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