From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: gpu: nova-core: fb: make sure to unregister SysmemFlush on boot failure Date: Sun, 12 Apr 2026 11:22:40 +1000 Message-ID: In-Reply-To: <20260409-fix-systemflush-v1-1-a1d6c968f17c@nvidia.com> References: <20260409-fix-systemflush-v1-1-a1d6c968f17c@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: gpu: nova-core: fb: make sure to unregister SysmemFlush on boot failure Author: Eliot Courtney Patches: 3 Reviewed: 2026-04-12T11:22:40.453075 --- This is a single-patch fix for a real resource leak bug in `nova-core`. When `Gpu::new` fails after `SysmemFlush::register()` succeeds (e.g., during falcon creation or GSP boot), the sysmem flush page is leaked: it is freed by Rust's automatic drop of `CoherentHandle`, but the GPU hardware register still points to the now-freed DMA address. This could lead to the GPU writing to stale/reused memory. The approach is sound: add a `Drop` impl that performs best-effort cleanup via revocable BAR access, while preserving the existing infallible manual `unregister()` path for normal teardown. The guard against double-unregister warnings (`registered_dma_handle != 0`) is a necessary and correct consequence of having both manual and automatic cleanup paths. **Verdict: The patch is correct and should be accepted.** I have one minor observation below but no blocking issues. --- --- Generated by Claude Code Patch Reviewer