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/amd/display: Wrap DCN32 phantom-plane allocation in DC_RUN_WITH_PREEMPTION_ENABLED Date: Tue, 05 May 2026 07:55:36 +1000 Message-ID: In-Reply-To: <20260504201905.90667-1-mikhail.v.gavrilov@gmail.com> References: <20260504201905.90667-1-mikhail.v.gavrilov@gmail.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/amd/display: Wrap DCN32 phantom-plane allocation in DC_RUN_WIT= H_PREEMPTION_ENABLED Author: Mikhail Gavrilov 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 exce= ptionally thorough =E2=80=94 it correctly identifies the root cause, provid= es 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_sta= te`. In this kernel's `__kvmalloc_node_noprof` (slub.c:6818), the vmalloc f= allback is **unconditional** when kmalloc fails for sizes > PAGE_SIZE =E2= =80=94 the `GFP_ATOMIC` flag only controls `VM_ALLOW_HUGE_VMAP`, not whethe= r vmalloc is attempted. When this runs inside `DC_FP_START()` (which disabl= es 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 prep= rocessor guard should be dropped.** --- --- Generated by Claude Code Patch Reviewer