On Mon, Jan 23, 2023 at 11:43:31AM +0100, David Hildenbrand wrote: >> diff --git a/mm/vmalloc.c b/mm/vmalloc.c >> index 97156eab6fe581..5b432508319a4f 100644 >> --- a/mm/vmalloc.c >> +++ b/mm/vmalloc.c >> @@ -2588,11 +2588,20 @@ struct vm_struct *remove_vm_area(const void *addr) >> might_sleep(); >> + if (WARN(!PAGE_ALIGNED(addr), "Trying to vfree() bad address (%p)\n", >> + addr)) >> + return NULL; > > While at it, might want to use WARN_ONCE() instead. One thing at a time. But yes, this makes sense and could be an incremental patch.