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
…
> kmemdup_array() function has integer overflow checking built it. …
built-in?
Regards,
Markus
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
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.