[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201027121725.24660-1-brgl@bgdev.pl>
Date: Tue, 27 Oct 2020 13:17:17 +0100
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Sumit Semwal <sumit.semwal@...aro.org>,
Gustavo Padovan <gustavo@...ovan.org>,
Christian König <christian.koenig@....com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Borislav Petkov <bp@...en8.de>,
Tony Luck <tony.luck@...el.com>,
James Morse <james.morse@....com>,
Robert Richter <rric@...nel.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Linus Walleij <linus.walleij@...aro.org>,
"Michael S . Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>
Cc: linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linaro-mm-sig@...ts.linaro.org, linux-kernel@...r.kernel.org,
linux-edac@...r.kernel.org, linux-gpio@...r.kernel.org,
kvm@...r.kernel.org, virtualization@...ts.linux-foundation.org,
netdev@...r.kernel.org, linux-mm@...ck.org,
alsa-devel@...a-project.org,
Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: [PATCH 0/8] slab: provide and use krealloc_array()
From: Bartosz Golaszewski <bgolaszewski@...libre.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.
A separate series will follow adding devm_krealloc_array() which is
needed in the xilinx adc driver.
Bartosz Golaszewski (8):
mm: slab: provide krealloc_array()
ALSA: pcm: use krealloc_array()
vhost: vringh: use krealloc_array()
pinctrl: use krealloc_array()
edac: ghes: use krealloc_array()
drm: atomic: use krealloc_array()
hwtracing: intel: use krealloc_array()
dma-buf: use krealloc_array()
drivers/dma-buf/sync_file.c | 4 ++--
drivers/edac/ghes_edac.c | 4 ++--
drivers/gpu/drm/drm_atomic.c | 3 ++-
drivers/hwtracing/intel_th/msu.c | 2 +-
drivers/pinctrl/pinctrl-utils.c | 2 +-
drivers/vhost/vringh.c | 3 ++-
include/linux/slab.h | 11 +++++++++++
sound/core/pcm_lib.c | 4 ++--
8 files changed, 23 insertions(+), 10 deletions(-)
--
2.29.1
Powered by blists - more mailing lists