Re: [PATCH v2] mm: module_alloc: check if size is 0

From: Rusty Russell
Date: Mon Jul 01 2013 - 04:53:41 EST


Joe Perches <joe@xxxxxxxxxxx> writes:
> On Thu, 2013-06-27 at 15:23 -0700, Andrew Morton wrote:
>> On Thu, 27 Jun 2013 11:39:17 +0200 Ralf Baechle <ralf@xxxxxxxxxxxxxx> wrote:
> []
>> Veli-Pekka's original patch would be neater if we were to add a new
>>
>> void *__vmalloc_node_range_zero_size_ok(<args>)
>> {
>> if (size == 0)
>> return NULL;
>
> I believe you mean
> return ZERO_SIZE_PTR;

Yes, this is the Right Fix.

Thanks,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/