Re: [PATCH 1/1 net-next] net: dsa: replace count*size kmalloc by kmalloc_array

2014-11-16 Thread David Miller
From: Fabian Frederick Date: Fri, 14 Nov 2014 19:36:42 +0100 > kmalloc_array manages count*sizeof overflow. > > Signed-off-by: Fabian Frederick Applied, and yes I read Joe's feedback and the rest of this thread wrt. sizeof(u8/s8). That can be done as a followup. -- To unsubscribe from this

Re: [PATCH 1/1 net-next] net: dsa: replace count*size kmalloc by kmalloc_array

2014-11-16 Thread David Miller
From: Fabian Frederick f...@skynet.be Date: Fri, 14 Nov 2014 19:36:42 +0100 kmalloc_array manages count*sizeof overflow. Signed-off-by: Fabian Frederick f...@skynet.be Applied, and yes I read Joe's feedback and the rest of this thread wrt. sizeof(u8/s8). That can be done as a followup. --

Re: [PATCH 1/1 net-next] net: dsa: replace count*size kmalloc by kmalloc_array

2014-11-14 Thread Joe Perches
On Fri, 2014-11-14 at 20:32 +0100, Fabian Frederick wrote: > On 14 November 2014 at 20:14 Joe Perches wrote: > > On Fri, 2014-11-14 at 20:02 +0100, Fabian Frederick wrote: > > > On 14 November 2014 at 19:47 Joe Perches wrote: > > > > On Fri, 2014-11-14 at 19:36 +0100, Fabian Frederick wrote: > >

Re: [PATCH 1/1 net-next] net: dsa: replace count*size kmalloc by kmalloc_array

2014-11-14 Thread Fabian Frederick
> On 14 November 2014 at 20:14 Joe Perches wrote: > > > On Fri, 2014-11-14 at 20:02 +0100, Fabian Frederick wrote: > > On 14 November 2014 at 19:47 Joe Perches wrote: > > > On Fri, 2014-11-14 at 19:36 +0100, Fabian Frederick wrote: > > > > kmalloc_array manages count*sizeof overflow. > > > > >

Re: [PATCH 1/1 net-next] net: dsa: replace count*size kmalloc by kmalloc_array

2014-11-14 Thread Joe Perches
On Fri, 2014-11-14 at 20:02 +0100, Fabian Frederick wrote: > On 14 November 2014 at 19:47 Joe Perches wrote: > > On Fri, 2014-11-14 at 19:36 +0100, Fabian Frederick wrote: > > > kmalloc_array manages count*sizeof overflow. > > > > Fundamentally correct, but is this necessary or useful? > >

Re: [PATCH 1/1 net-next] net: dsa: replace count*size kmalloc by kmalloc_array

2014-11-14 Thread Fabian Frederick
> On 14 November 2014 at 19:47 Joe Perches wrote: > > > On Fri, 2014-11-14 at 19:36 +0100, Fabian Frederick wrote: > > kmalloc_array manages count*sizeof overflow. > > Fundamentally correct, but is this necessary or useful? > sizeof(s8) isn't often going to be anything other than 1. Absolutely,

Re: [PATCH 1/1 net-next] net: dsa: replace count*size kmalloc by kmalloc_array

2014-11-14 Thread Joe Perches
On Fri, 2014-11-14 at 19:36 +0100, Fabian Frederick wrote: > kmalloc_array manages count*sizeof overflow. Fundamentally correct, but is this necessary or useful? sizeof(s8) isn't often going to be anything other than 1. Would the kernel even work without that assumption? > diff --git

[PATCH 1/1 net-next] net: dsa: replace count*size kmalloc by kmalloc_array

2014-11-14 Thread Fabian Frederick
kmalloc_array manages count*sizeof overflow. Signed-off-by: Fabian Frederick --- net/dsa/dsa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 4648f12..c00cca3 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -526,7 +526,8 @@ static int

[PATCH 1/1 net-next] net: dsa: replace count*size kmalloc by kmalloc_array

2014-11-14 Thread Fabian Frederick
kmalloc_array manages count*sizeof overflow. Signed-off-by: Fabian Frederick f...@skynet.be --- net/dsa/dsa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 4648f12..c00cca3 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -526,7 +526,8

Re: [PATCH 1/1 net-next] net: dsa: replace count*size kmalloc by kmalloc_array

2014-11-14 Thread Joe Perches
On Fri, 2014-11-14 at 19:36 +0100, Fabian Frederick wrote: kmalloc_array manages count*sizeof overflow. Fundamentally correct, but is this necessary or useful? sizeof(s8) isn't often going to be anything other than 1. Would the kernel even work without that assumption? diff --git

Re: [PATCH 1/1 net-next] net: dsa: replace count*size kmalloc by kmalloc_array

2014-11-14 Thread Fabian Frederick
On 14 November 2014 at 19:47 Joe Perches j...@perches.com wrote: On Fri, 2014-11-14 at 19:36 +0100, Fabian Frederick wrote: kmalloc_array manages count*sizeof overflow. Fundamentally correct, but is this necessary or useful? sizeof(s8) isn't often going to be anything other than 1.

Re: [PATCH 1/1 net-next] net: dsa: replace count*size kmalloc by kmalloc_array

2014-11-14 Thread Joe Perches
On Fri, 2014-11-14 at 20:02 +0100, Fabian Frederick wrote: On 14 November 2014 at 19:47 Joe Perches j...@perches.com wrote: On Fri, 2014-11-14 at 19:36 +0100, Fabian Frederick wrote: kmalloc_array manages count*sizeof overflow. Fundamentally correct, but is this necessary or useful?

Re: [PATCH 1/1 net-next] net: dsa: replace count*size kmalloc by kmalloc_array

2014-11-14 Thread Fabian Frederick
On 14 November 2014 at 20:14 Joe Perches j...@perches.com wrote: On Fri, 2014-11-14 at 20:02 +0100, Fabian Frederick wrote: On 14 November 2014 at 19:47 Joe Perches j...@perches.com wrote: On Fri, 2014-11-14 at 19:36 +0100, Fabian Frederick wrote: kmalloc_array manages count*sizeof

Re: [PATCH 1/1 net-next] net: dsa: replace count*size kmalloc by kmalloc_array

2014-11-14 Thread Joe Perches
On Fri, 2014-11-14 at 20:32 +0100, Fabian Frederick wrote: On 14 November 2014 at 20:14 Joe Perches j...@perches.com wrote: On Fri, 2014-11-14 at 20:02 +0100, Fabian Frederick wrote: On 14 November 2014 at 19:47 Joe Perches j...@perches.com wrote: On Fri, 2014-11-14 at 19:36 +0100,