[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o88vcqvh.ffs@tglx>
Date: Tue, 14 Sep 2021 13:56:34 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Bixuan Cui <cuibixuan@...wei.com>, linux-kernel@...r.kernel.org
Cc: maz@...nel.org, john.wanghui@...wei.com
Subject: Re: [PATCH -next] irqdomain: fix overflow error
On Wed, Sep 08 2021 at 09:46, Bixuan Cui wrote:
> In function ‘kmalloc_node’,
> inlined from ‘kzalloc_node.constprop’ at ./include/linux/slab.h:743:9,
> inlined from ‘__irq_domain_add’ at kernel/irq/irqdomain.c:153:9:
> ./include/linux/slab.h:618:9: error: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
> return __kmalloc_node(size, flags, node);
>
> The 'size' can be negative here, which will then get turned into a giant
> size argument for kzalloc_node(). Changing the size to 'unsigned int'
> instead seems more appropriate.
What's more appropriate about that?
Thanks,
tglx
Powered by blists - more mailing lists