summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorStanislav Kinsburskii <skinsburskii@gmail.com>2026-07-14 15:54:32 -0700
committerMatthew Brost <matthew.brost@intel.com>2026-07-21 00:27:34 -0700
commit67b8bfd4ec7dac6e79a7ad9ad19a7a9d6fc35a26 (patch)
tree30fd06ff826e62f3a0366a6f5aa678933eca74cc /tools/perf/scripts/python
parent847b371debf3c8c72384ab7b9a0c4123a74cc925 (diff)
drm/gpusvm: Zero HMM PFNs before scanning ranges
drm_gpusvm_scan_mm() asks HMM to report the current CPU page-table state without faulting missing entries by leaving default_flags set to zero. The HMM PFN array is still caller-owned input/output state, and the framework may preserve input bits while filling entries. It is not safe for the caller to hand HMM an uninitialized array and then treat entries without HMM_PFN_VALID as an authoritative unpopulated result. Use kvcalloc() for the temporary PFN array so entries that are not reported as valid start from the documented zero state. This prevents random stack or heap contents from being interpreted as HMM PFN flags or PFN values during the scan. Fixes: f1d08a586482 ("drm/gpusvm: Introduce a function to scan the current migration state") Cc: stable@vger.kernel.org Signed-off-by: Stanislav Kinsburskii <skinsburskii@gmail.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/178406967042.1113483.2116704310277917086.stgit@skinsburskii
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions