diff options
| author | Hao Ge <hao.ge@linux.dev> | 2026-05-28 04:13:36 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-06-09 04:21:27 +0300 |
| commit | 8f7275c174bc5bcc8fc1bec8024e2b3e6fe17f46 (patch) | |
| tree | 3f0813b01ab3b1549004681515af3d43813a303a /include/linux/workqueue.h | |
| parent | d1aba985984781947ad67c1b44ac64bd498c8f27 (diff) | |
| download | linux-8f7275c174bc5bcc8fc1bec8024e2b3e6fe17f46.tar.xz | |
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>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions
