search for: krealloc_array

Displaying 4 results from an estimated 4 matches for "krealloc_array".

Did you mean: realloc_array
2020 Nov 03
0
[PATCH v2 0/8] slab: provide and use krealloc_array()
...t;bgolaszewski at baylibre.com> > > 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. My concern about this is a possible assumption that __GFP_ZERO will work, and as far as I know, it will no...
2020 Nov 02
0
[PATCH v2 1/8] mm: slab: provide krealloc_array()
On Mon, Nov 02, 2020 at 04:20:30PM +0100, Bartosz Golaszewski wrote: > +Chunks allocated with `kmalloc` can be resized with `krealloc`. Similarly > +to `kmalloc_array`: a helper for resising arrays is provided in the form of > +`krealloc_array`. Is there any reason you chose to `do_this` instead of do_this()? The automarkup script turns do_this() into a nice link to the documentation which you're adding below. Typo 'resising' resizing.
2020 Nov 02
0
[PATCH v2 8/8] dma-buf: use krealloc_array()
On Mon, Nov 02, 2020 at 04:20:37PM +0100, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bgolaszewski at baylibre.com> > > Use the helper that checks for overflows internally instead of manually > calculating the size of the new array. ... > + nfences = krealloc_array(fences, i, > + sizeof(*fences), GFP_KERNEL); On 80 position is closing parenthesis, which, I think, makes it okay to put on one line. -- With Best Regards, Andy Shevchenko
2020 Nov 03
0
[PATCH v2 0/8] slab: provide and use krealloc_array()
On Tue, Nov 3, 2020 at 12:13 PM Bartosz Golaszewski <brgl at bgdev.pl> wrote: > On Tue, Nov 3, 2020 at 5:14 AM Joe Perches <joe at perches.com> wrote: > > On Mon, 2020-11-02 at 16:20 +0100, Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski <bgolaszewski at baylibre.com> > Yeah so I had this concern for devm_krealloc() and even sent a patch > that