Re: [PATCH] drm/nouveau: Use kmemdup_array() instead of kmemdup()

2024-06-18 Thread Dan Carpenter
On Mon, Jun 17, 2024 at 05:55:33PM +0200, Danilo Krummrich wrote: > On 6/17/24 11:33, Dan Carpenter wrote: > > Use kmemdup_array() because we're allocating an array. > > > > The main difference between kmemdup() and kmemdup_array() is that the > > kmemdup_array() function has integer overflow chec

Re: [PATCH] drm/nouveau: Use kmemdup_array() instead of kmemdup()

2024-06-17 Thread Markus Elfring
… > kmemdup_array() function has integer overflow checking built it. … built-in? Regards, Markus

Re: [PATCH] drm/nouveau: Use kmemdup_array() instead of kmemdup()

2024-06-17 Thread Danilo Krummrich
On 6/17/24 11:33, Dan Carpenter wrote: Use kmemdup_array() because we're allocating an array. The main difference between kmemdup() and kmemdup_array() is that the kmemdup_array() function has integer overflow checking built it. The "args->in_sync.count" variable is a u32 so integer overflows w

[PATCH] drm/nouveau: Use kmemdup_array() instead of kmemdup()

2024-06-17 Thread Dan Carpenter
Use kmemdup_array() because we're allocating an array. The main difference between kmemdup() and kmemdup_array() is that the kmemdup_array() function has integer overflow checking built it. The "args->in_sync.count" variable is a u32 so integer overflows would only be a concern on 32bit systems.