Re: [PATCH] checkpatch: Add --strict test for kmalloc/kzalloc with multiply

2014-05-15 Thread Andrew Morton
On Thu, 15 May 2014 16:04:46 -0700 Joe Perches wrote: > On Thu, 2014-05-15 at 15:58 -0700, Andrew Morton wrote: > > On Tue, 13 May 2014 16:48:49 -0700 Joe Perches wrote: > > > Protect against sizeof overflows by preferring > > > kmalloc_array and kcalloc to kmalloc/kzalloc > > > with a sizeof mu

Re: [PATCH] checkpatch: Add --strict test for kmalloc/kzalloc with multiply

2014-05-15 Thread Joe Perches
On Thu, 2014-05-15 at 15:58 -0700, Andrew Morton wrote: > On Tue, 13 May 2014 16:48:49 -0700 Joe Perches wrote: > > Protect against sizeof overflows by preferring > > kmalloc_array and kcalloc to kmalloc/kzalloc > > with a sizeof multiply. [] > > +# check for k[mz]alloc with multiplies that could

Re: [PATCH] checkpatch: Add --strict test for kmalloc/kzalloc with multiply

2014-05-15 Thread Andrew Morton
On Tue, 13 May 2014 16:48:49 -0700 Joe Perches wrote: > Protect against sizeof overflows by preferring > kmalloc_array and kcalloc to kmalloc/kzalloc > with a sizeof multiply. > > ... > > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -4378,6 +4378,20 @@ sub process { >

[PATCH] checkpatch: Add --strict test for kmalloc/kzalloc with multiply

2014-05-13 Thread Joe Perches
Protect against sizeof overflows by preferring kmalloc_array and kcalloc to kmalloc/kzalloc with a sizeof multiply. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 14 ++ 1 file changed, 14 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e7ff52a