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/connector: check if destroy function exist Date: Mon, 25 May 2026 20:21:15 +1000 Message-ID: In-Reply-To: <20260521103329.140064-1-andreas@kemnade.info> References: <20260521103329.140064-1-andreas@kemnade.info> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: drm/connector: check if destroy function exist Author: Andreas Kemnade Patches: 1 Reviewed: 2026-05-25T20:21:15.327783 --- This is a single-patch fix for a NULL function pointer dereference in `drm_= connector_free()` and `drm_connector_free_work_fn()`. The fix is correct an= d necessary. Connectors initialized via `drmm_connector_init()` are explici= tly required to have `.destroy =3D NULL` (enforced by a `drm_WARN_ON` check= at `drm_connector.c:533`), yet the `drm_connector_free` and `drm_connector= _free_work_fn` paths unconditionally call `connector->funcs->destroy(connec= tor)` without a NULL check. This can lead to a kernel oops when a `drmm`-ma= naged connector's refcount drops to zero. The fix is minimal, correct in scope, and targets the right locations. The = referenced `Fixes:` tag (`c12907be57b1`) makes sense =E2=80=94 that's when = `drm_bridge_connector` was switched to `drmm` allocations, which would have= introduced the possibility of reaching this code with a NULL `.destroy`. **Verdict: Patch looks good. Recommend acceptance.** --- Generated by Claude Code Patch Reviewer