Re: [PATCH v2 0/8] slab: provide and use krealloc_array()

2020-11-04 Thread Bartosz Golaszewski
On Tue, Nov 3, 2020 at 5:14 AM Joe Perches wrote: > > On Mon, 2020-11-02 at 16:20 +0100, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Andy brought to my attention the fact that users allocating an array of > > equally sized elements should check if the size multiplication

Re: [PATCH v2 0/8] slab: provide and use krealloc_array()

2020-11-03 Thread Andy Shevchenko
On Tue, Nov 3, 2020 at 12:13 PM Bartosz Golaszewski wrote: > On Tue, Nov 3, 2020 at 5:14 AM Joe Perches wrote: > > On Mon, 2020-11-02 at 16:20 +0100, Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski > Yeah so I had this concern for devm_krealloc() and even sent a patch > that

[PATCH v2 0/8] slab: provide and use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Andy brought to my attention the fact that users allocating an array of equally sized elements should check if the size multiplication doesn't overflow. This is why we have helpers like kmalloc_array(). However we don't have krealloc_array() equivalent and there are

Re: [PATCH v2 0/8] slab: provide and use krealloc_array()

2020-11-02 Thread Joe Perches
On Mon, 2020-11-02 at 16:20 +0100, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Andy brought to my attention the fact that users allocating an array of > equally sized elements should check if the size multiplication doesn't > overflow. This is why we have helpers like