summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHao Ge <hao.ge@linux.dev>2026-05-13 11:25:25 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-06-03 01:22:17 +0300
commit59f19bf6f119eecfa16355186b593abba8eb5198 (patch)
tree5403ce0a53c65bf44039addf60f839277f58305e /include
parent395085eacdfa37a64b37ae16a6dc467fb8670faf (diff)
downloadlinux-59f19bf6f119eecfa16355186b593abba8eb5198.tar.xz
lib/test_hmm: use kvfree() to free kvcalloc() allocations
Coccinelle scripts/coccinelle/api/kfree_mismatch.cocci reports the following warnings: lib/test_hmm.c:1256:15-16: WARNING kvmalloc is used to allocate this memory at line 1191 lib/test_hmm.c:1257:15-16: WARNING kvmalloc is used to allocate this memory at line 1196 Fix this by replacing kfree() with kvfree() to correctly handle the vmalloc() fallback path of kvcalloc(). Link: https://lore.kernel.org/20260513082525.154036-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> Acked-by: Balbir Singh <balbirs@nvidia.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Leon Romanovsky <leon@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions