Something went wrong. Try again.
Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Something went wrong. Try again.
lib/test_hmm: fix memory leak in dmirror_migrate_to_system()
Move the kvcalloc() calls after the early return checks to avoid leaking src_pfns and dst_pfns when end < start or mmget_not_zero() fails. Link: https://lore.kernel.org/20260528011336.20797-1-hao.ge@linux.dev Fixes: 775465fd26a3 ("lib/test_hmm: add zone device private THP test infrastructure") Signed-off-by: Hao Ge <hao.ge@linux.dev> Reviewed-by: Alistair Popple <apopple@nvidia.com> Reported-by: Sashiko <sashiko-bot@kernel.org> Reviewed-by: Balbir Singh <balbirs@nvidia.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Leon Romanovsky <leon@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Author Hao Ge Committer Andrew Morton Date (Jun 9, 2026, 1:21 AM UTC) Commit
Copy SHA
Parent d1aba985 d1aba985984781947ad67c1b44ac64bd498c8f27