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/vc4: fix NULL dereference in vc4_hvs_unbind Date: Tue, 05 May 2026 08:48:38 +1000 Message-ID: In-Reply-To: <20260502121251.39206-3-thorsten.blum@linux.dev> References: <20260502121251.39206-3-thorsten.blum@linux.dev> 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/vc4: fix NULL dereference in vc4_hvs_unbind Author: Thorsten Blum Patches: 1 Reviewed: 2026-05-05T08:48:38.566003 --- This is a single-patch fix for a real NULL pointer dereference in `vc4_hvs_= unbind()`. The bug occurs because `vc4_drm_unbind()` calls `dev_set_drvdata= (dev, NULL)` before the component framework's `devres_release_group()` trig= gers `vc4_component_unbind_all()`, which in turn calls `vc4_hvs_unbind()`. = At that point, `dev_get_drvdata(master)` returns NULL, and the original cod= e immediately dereferences it through `to_vc4_dev(drm)` and `vc4->hvs`. The fix is correct and minimal =E2=80=94 it moves the `vc4` and `hvs` varia= ble initialization after a NULL check on `drm`. The pattern is appropriate = for a defensive guard in a teardown path. **Verdict: The patch looks correct and is suitable for merging.** --- Generated by Claude Code Patch Reviewer