[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220207162107.eblu6rxyhkuyyqnf@maple.lan>
Date: Mon, 7 Feb 2022 16:21:07 +0000
From: Daniel Thompson <daniel.thompson@...aro.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Thierry Reding <thierry.reding@...il.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, Lee Jones <lee.jones@...aro.org>,
Jingoo Han <jingoohan1@...il.com>,
Helge Deller <deller@....de>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org, linux-pwm@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org
Subject: Re: [PATCH] backlight: pwm_bl: Avoid open coded arithmetic in memory
allocation
On Sat, Feb 05, 2022 at 08:40:48AM +0100, Christophe JAILLET wrote:
> kmalloc_array()/kcalloc() should be used to avoid potential overflow when
> a multiplication is needed to compute the size of the requested memory.
>
> So turn a kzalloc()+explicit size computation into an equivalent kcalloc().
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Reviewed-by: Daniel Thompson <daniel.thompson@...aro.org>
Daniel.
Powered by blists - more mailing lists