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/vkms: Fix ABBA deadlock in vblank disable and timer callback
Date: Sat, 16 May 2026 09:05:03 +1000	[thread overview]
Message-ID: <review-overall-20260515131826.388154-1-w15303746062@163.com> (raw)
In-Reply-To: <20260515131826.388154-1-w15303746062@163.com>

Overall Series Review

Subject: drm/vkms: Fix ABBA deadlock in vblank disable and timer callback
Author: <w15303746062@163.com>
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_vblank_simulate()` (an hrtimer callback that tries to acquire `vblank_time_lock` via `drm_handle_vblank()`).

**The deadlock analysis is correct** — 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_vblank_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 is incomplete and the patch targets the wrong tree.

---

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-05-15 23:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15 13:18 [PATCH 6.18.y] drm/vkms: Fix ABBA deadlock in vblank disable and timer callback w15303746062
2026-05-15 15:09 ` Greg KH
2026-05-15 23:05 ` Claude Code Review Bot [this message]
2026-05-15 23:05 ` 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-overall-20260515131826.388154-1-w15303746062@163.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