Re: [PATCH] net: ethtool: avoid allocation failure for dump_regs

2017-01-20 Thread Kalle Valo
David Miller writes: > From: Kalle Valo > Date: Thu, 19 Jan 2017 20:08:30 +0200 > >> "John W. Linville" writes: >> >>> I forgot to Cc Johannes and Kalle... >> >> Also adding linux-wireless. >> >>> On Thu, Jan 19, 2017 at 09:15:09AM -0500, John W. Linville wrote: >>> I'm responsible for

Re: [PATCH] net: ethtool: avoid allocation failure for dump_regs

2017-01-19 Thread David Miller
From: Kalle Valo Date: Thu, 19 Jan 2017 20:08:30 +0200 > "John W. Linville" writes: > >> I forgot to Cc Johannes and Kalle... > > Also adding linux-wireless. > >> On Thu, Jan 19, 2017 at 09:15:09AM -0500, John W. Linville wrote: >>> On Thu, Jan 19, 2017 at 07:35:22AM -0500, David Arcari wrote

Re: [PATCH] net: ethtool: avoid allocation failure for dump_regs

2017-01-19 Thread Kalle Valo
"John W. Linville" writes: > I forgot to Cc Johannes and Kalle... Also adding linux-wireless. > On Thu, Jan 19, 2017 at 09:15:09AM -0500, John W. Linville wrote: >> On Thu, Jan 19, 2017 at 07:35:22AM -0500, David Arcari wrote: >> > On 01/18/2017 11:45 AM, David Miller wrote: >> > > From: David

Re: [PATCH] net: ethtool: avoid allocation failure for dump_regs

2017-01-19 Thread John W. Linville
I forgot to Cc Johannes and Kalle... On Thu, Jan 19, 2017 at 09:15:09AM -0500, John W. Linville wrote: > On Thu, Jan 19, 2017 at 07:35:22AM -0500, David Arcari wrote: > > On 01/18/2017 11:45 AM, David Miller wrote: > > > From: David Arcari > > > Date: Wed, 18 Jan 2017 08:34:05 -0500 > > > > > >>

Re: [PATCH] net: ethtool: avoid allocation failure for dump_regs

2017-01-19 Thread John W. Linville
On Thu, Jan 19, 2017 at 07:35:22AM -0500, David Arcari wrote: > On 01/18/2017 11:45 AM, David Miller wrote: > > From: David Arcari > > Date: Wed, 18 Jan 2017 08:34:05 -0500 > > > >> If the user executes 'ethtool -d' for an interface and the associated > >> get_regs_len() function returns 0, the us

Re: [PATCH] net: ethtool: avoid allocation failure for dump_regs

2017-01-19 Thread David Arcari
On 01/18/2017 11:45 AM, David Miller wrote: > From: David Arcari > Date: Wed, 18 Jan 2017 08:34:05 -0500 > >> If the user executes 'ethtool -d' for an interface and the associated >> get_regs_len() function returns 0, the user will see a call trace from >> the vmalloc() call in ethtool_get_regs().

Re: [PATCH] net: ethtool: avoid allocation failure for dump_regs

2017-01-18 Thread David Miller
From: David Arcari Date: Wed, 18 Jan 2017 08:34:05 -0500 > If the user executes 'ethtool -d' for an interface and the associated > get_regs_len() function returns 0, the user will see a call trace from > the vmalloc() call in ethtool_get_regs(). This patch modifies > ethtool_get_regs() to avoid

[PATCH] net: ethtool: avoid allocation failure for dump_regs

2017-01-18 Thread David Arcari
If the user executes 'ethtool -d' for an interface and the associated get_regs_len() function returns 0, the user will see a call trace from the vmalloc() call in ethtool_get_regs(). This patch modifies ethtool_get_regs() to avoid the call to vmalloc when the size is zero. Signed-off-by: David Ar