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/vkms: Fix ABBA deadlock in vblank disable and timer callback Date: Sat, 16 May 2026 09:05:03 +1000 Message-ID: In-Reply-To: <20260515131826.388154-1-w15303746062@163.com> References: <20260515131826.388154-1-w15303746062@163.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/vkms: Fix ABBA deadlock in vblank disable and timer callback Author: Patches: 2 Reviewed: 2026-05-16T09:05:03.765320 --- This is a single patch targeting stable tree 6.18.y that attempts to fix an= ABBA deadlock in the VKMS driver between `drm_vblank_disable_and_save()` (= which holds `vblank_time_lock` and calls `hrtimer_cancel()`) and `vkms_vbla= nk_simulate()` (an hrtimer callback that tries to acquire `vblank_time_lock= ` via `drm_handle_vblank()`). **The deadlock analysis is correct** =E2=80=94 this is a real lock ordering= issue. In fact, **mainline has already fixed this exact class of bug** as = part of the `DRM_CRTC_VBLANK_TIMER_FUNCS` refactoring. The new `drm_crtc_vb= lank_cancel_timer()` function at `drm_vblank.c:2261` uses the same `hrtimer= _try_to_cancel()` approach plus interval-clearing, and the comment at line = 2268-2271 explicitly documents this deadlock: > Calling hrtimer_cancel() can result in a deadlock with DRM's vblank_time_= lock and hrtimers' softirq_expiry_lock. However, this patch has **significant issues** that make it unsuitable for = merging as-is. **Verdict: Needs revision.** The fix idea is sound but the implementation i= s incomplete and the patch targets the wrong tree. --- --- Generated by Claude Code Patch Reviewer