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/gpusvm, pagemap: Do not assume DRM pagemap owns device pages Date: Sun, 12 Apr 2026 11:53:26 +1000 Message-ID: In-Reply-To: <20260409015512.3670302-1-matthew.brost@intel.com> References: <20260409015512.3670302-1-matthew.brost@intel.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/gpusvm, pagemap: Do not assume DRM pagemap owns device pages Author: Matthew Brost Patches: 4 Reviewed: 2026-04-12T11:53:26.381511 --- This is a single patch that hardens the DRM pagemap/gpusvm code against enc= ountering device pages not owned by DRM pagemap. The motivation is sound: i= f a device-private page comes from a different subsystem (not DRM pagemap),= `drm_pagemap_page_zone_device_data()` returns meaningless data that would = be blindly dereferenced. However, the implementation has several issues: 1. Using `WARN_ON_ONCE` for a legitimately expected condition is inappropri= ate =E2=80=94 it should be a quiet check, not a stack trace. 2. The change to `drm_pagemap_page_zone_device_data()` creates an inconsist= ency with `drm_pagemap_page_to_dpagemap()` which still dereferences the now= -nullable return without a NULL check. 3. The patch does not apply cleanly to drm-next because `drm_pagemap_migrat= e_to_devmem()` was restructured (the dereferences are now inside an `if (md= etails->source_peer_migrates)` block). 4. The `Suggested-by: sashiko.dev` tag is not a valid email address and doe= sn't conform to the standard kernel format of `Name `. The defensive NULL checks in the callers (patches 2 and 3 of the diff) are = reasonable hardening, but the core change to `drm_pagemap_page_zone_device_= data()` needs rework. --- --- Generated by Claude Code Patch Reviewer