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

From
Linus Walleij <hidden>
Date
2020-11-05 10:52:44
Also in
alsa-devel, dri-devel, kvm, linux-edac, linux-gpio, linux-media, linux-mm, lkml, virtualization
Reply to
Bartosz Golaszewski, 2020-10-27
On Tue, Oct 27, 2020 at 1:17 PM Bartosz Golaszewski [off-list ref] wrote:
From: Bartosz Golaszewski <redacted>

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 many
users who do their own multiplication when calling krealloc() for arrays.

This series provides krealloc_array() and uses it in a couple places.

A separate series will follow adding devm_krealloc_array() which is
needed in the xilinx adc driver.
The series:
Acked-by: Linus Walleij <redacted>

I really like this.

Yours,
Linus Walleij
Thread (21 messages) 21 messages, 11 authors, last reply 2020-11-05
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help