summaryrefslogtreecommitdiff
path: root/tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorStanislav Kinsburskii <skinsburskii@linux.microsoft.com>2026-03-17 15:04:55 +0000
committerWei Liu <wei.liu@kernel.org>2026-03-18 16:18:49 +0000
commitc0e296f257671ba10249630fe58026f29e4804d9 (patch)
tree15244ebc5e65d91f5832db482caee18ac0389fe2 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux-stable.git
parentb2ae73d954f71c7dd605eecfd817ed018dce7cc7 (diff)
mshv: Fix error handling in mshv_region_pin
The current error handling has two issues: First, pin_user_pages_fast() can return a short pin count (less than requested but greater than zero) when it cannot pin all requested pages. This is treated as success, leading to partially pinned regions being used, which causes memory corruption. Second, when an error occurs mid-loop, already pinned pages from the current batch are not properly accounted for before calling mshv_region_invalidate_pages(), causing a page reference leak. Treat short pins as errors and fix partial batch accounting before cleanup. Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions