Commit 61b963b5 authored by David Hildenbrand's avatar David Hildenbrand Committed by Andrew Morton

mm/gup_test: free memory allocated via kvcalloc() using kvfree()

We have to free via kvfree(), not via kfree().

Link: https://lkml.kernel.org/r/20221212182018.264900-1-david@redhat.com
Fixes: c77369b4 ("mm/gup_test: start/stop/read functionality for PIN LONGTERM test")
Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 8fa590bf
......@@ -214,7 +214,7 @@ static inline void pin_longterm_test_stop(void)
if (pin_longterm_test_nr_pages)
unpin_user_pages(pin_longterm_test_pages,
pin_longterm_test_nr_pages);
kfree(pin_longterm_test_pages);
kvfree(pin_longterm_test_pages);
pin_longterm_test_pages = NULL;
pin_longterm_test_nr_pages = 0;
}
......@@ -255,7 +255,7 @@ static inline int pin_longterm_test_start(unsigned long arg)
fast = !!(args.flags & PIN_LONGTERM_TEST_FLAG_USE_FAST);
if (!fast && mmap_read_lock_killable(current->mm)) {
kfree(pages);
kvfree(pages);
return -EINTR;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment