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/shmem-helper: Fix Map huge page mapping in fault handler
Date: Mon, 16 Mar 2026 11:46:49 +1000	[thread overview]
Message-ID: <review-overall-20260316002649.211819-1-pedrodemargomes@gmail.com> (raw)
In-Reply-To: <20260316002649.211819-1-pedrodemargomes@gmail.com>

Overall Series Review

Subject: drm/shmem-helper: Fix Map huge page mapping in fault handler
Author: Pedro Demarchi Gomes <pedrodemargomes@gmail.com>
Patches: 1
Reviewed: 2026-03-16T11:46:49.216342

---

This is a single-patch fix for a real race condition in the DRM shmem helper's huge page fault handling. The bug occurs when two concurrent page faults in the same PMD range race: one installs a PMD mapping via `vmf_insert_pfn_pmd()`, while the other tries a PTE mapping via `vmf_insert_pfn()`, hitting a BUG in `walk_to_pmd()` because a `pmd_trans_huge` entry is unexpected in the PTE path.

The fix is architecturally correct: move PMD mapping to a proper `.huge_fault` callback and keep `.fault` for PTE-only mappings, letting the MM layer coordinate between the two paths. However, the patch does not apply to the current drm-next tree, which has already refactored this code (renaming functions, adding `folio_mark_accessed()`, adding `pfn_mkwrite`). The patch needs to be rebased.

**Verdict:** The approach is sound, but needs rebasing against drm-next and has a few issues noted below.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-03-16  1:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16  0:26 [PATCH v3] drm/shmem-helper: Fix Map huge page mapping in fault handler Pedro Demarchi Gomes
2026-03-16  1:46 ` Claude Code Review Bot [this message]
2026-03-16  1:46 ` Claude review: " Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-13 14:17 [PATCH v2] " Pedro Demarchi Gomes
2026-03-13 20:52 ` Claude review: " Claude Code Review Bot
2026-03-13 20:52 ` 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-20260316002649.211819-1-pedrodemargomes@gmail.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