From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/amd/display: Wrap DCN32 phantom-plane allocation in DC_RUN_WITH_PREEMPTION_ENABLED
Date: Tue, 05 May 2026 07:55:36 +1000 [thread overview]
Message-ID: <review-overall-20260504201905.90667-1-mikhail.v.gavrilov@gmail.com> (raw)
In-Reply-To: <20260504201905.90667-1-mikhail.v.gavrilov@gmail.com>
Overall Series Review
Subject: drm/amd/display: Wrap DCN32 phantom-plane allocation in DC_RUN_WITH_PREEMPTION_ENABLED
Author: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Patches: 3
Reviewed: 2026-05-05T07:55:36.347956
---
This is a single well-analyzed bugfix patch targeting a real kernel BUG_ON crash in the DCN32 display mode validation path. The commit message is exceptionally thorough — it correctly identifies the root cause, provides a clear call trace, documents the reproducer, and distinguishes this fix from related prior work (Ard Biesheuvel's DC FP fixes).
The bug is real and confirmed by the code: `dc_create_plane_state()` uses `kvzalloc_obj(*plane_state, GFP_ATOMIC)` for a ~335 KiB `struct dc_plane_state`. In this kernel's `__kvmalloc_node_noprof` (slub.c:6818), the vmalloc fallback is **unconditional** when kmalloc fails for sizes > PAGE_SIZE — the `GFP_ATOMIC` flag only controls `VM_ALLOW_HUGE_VMAP`, not whether vmalloc is attempted. When this runs inside `DC_FP_START()` (which disables softirqs via `fpregs_lock()`), vmalloc's `BUG_ON(in_interrupt())` fires.
The fix concept is correct: wrap the allocation in `DC_RUN_WITH_PREEMPTION_ENABLED()` to temporarily exit the FP context. However, the fix location is suboptimal.
**Verdict: Approach is correct, but the fix should be applied in `dc_create_plane_state()` itself rather than at the call site, and the redundant preprocessor guard should be dropped.**
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-04 21:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 20:19 [PATCH] drm/amd/display: Wrap DCN32 phantom-plane allocation in DC_RUN_WITH_PREEMPTION_ENABLED Mikhail Gavrilov
2026-05-04 20:57 ` Aurabindo Pillai
2026-05-04 21:01 ` Alex Deucher
2026-05-04 21:55 ` Claude Code Review Bot [this message]
2026-05-04 21:55 ` 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-20260504201905.90667-1-mikhail.v.gavrilov@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