Re: [PATCH 08/10] mm: move debug checks from __vunmap to remove_vm_area

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux