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/virtio: Fix driver removal with disabled KMS Date: Fri, 05 Jun 2026 06:30:56 +1000 Message-ID: In-Reply-To: <20260604122743.13383-1-dmitry.osipenko@collabora.com> References: <20260604122743.13383-1-dmitry.osipenko@collabora.com> 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/virtio: Fix driver removal with disabled KMS Author: Dmitry Osipenko Patches: 1 Reviewed: 2026-06-05T06:30:56.726523 --- This is a single-patch fix for a kernel crash that occurs when the virtio-g= pu driver is removed (unbound) while KMS support is disabled (`CONFIG_DRM_V= IRTIO_GPU_KMS=3Dn` or the device reports zero scanouts). The fix is correct= in concept: when KMS is disabled, `dev->driver_features` has `DRIVER_MODES= ET | DRIVER_ATOMIC` cleared and `drmm_mode_config_init()` is never called, = so calling `drm_atomic_helper_shutdown()` unconditionally accesses uninitia= lized mode_config state (uninitialized mutexes, zeroed list heads) and cras= hes. The patch does **not apply cleanly** to current drm-next. The diff context = shows `virtio_gpu_release_vqs(dev)` preceding `drm_dev_unplug(dev)` in `vir= tio_gpu_remove()`, but the current drm-next tree has no such call =E2=80=94= the function is just `drm_dev_unplug` / `drm_atomic_helper_shutdown` / `vi= rtio_gpu_deinit` / `drm_dev_put`. The author appears to have based this on = a different tree version. A rebase is needed. --- Generated by Claude Code Patch Reviewer