Re: [PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-08 Thread David Miller
From: Pavel Belous Date: Thu, 4 May 2017 23:10:56 +0300 > From: Pavel Belous > > This patch fixes the crash that happens when driver tries to collect > statistics > from already released "aq_vec" object. > If adapter is in "down" state we still allow user to see statistics from HW. > > V2: f

Re: [PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-04 Thread David Arcari
On 05/04/2017 04:10 PM, Pavel Belous wrote: > From: Pavel Belous > > This patch fixes the crash that happens when driver tries to collect > statistics > from already released "aq_vec" object. > If adapter is in "down" state we still allow user to see statistics from HW. > > V2: fixed braces aro

Re: [PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-04 Thread Joe Perches
On Thu, 2017-05-04 at 23:10 +0300, Pavel Belous wrote: > diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c > b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c [] > @@ -959,8 +959,10 @@ void aq_nic_free_hot_resources(struct aq_nic_s *self) > goto err_exit; > > for (

[PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-04 Thread Pavel Belous
From: Pavel Belous This patch fixes the crash that happens when driver tries to collect statistics from already released "aq_vec" object. If adapter is in "down" state we still allow user to see statistics from HW. V2: fixed braces around "aq_vec_free". Fixes: 97bde5c4f909 ("net: ethernet: aqua

Re: [PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-04 Thread Lino Sanfilippo
On 04.05.2017 20:37, Pavel Belous wrote: > > Yes, even adapter is in the down state user can still see statistics from the > HW. > For example (adapter is down): > > $ ethtool -S enp2s0 > NIC statistics: > InPackets: 3237727 > InUCast: 3237214 > InMCast: 391 > InBCast: 122 >

Re: [PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-04 Thread Pavel Belous
On 04.05.2017 21:17, Joe Perches wrote: On Thu, 2017-05-04 at 20:08 +0300, Pavel Belous wrote: I will prepare another patch with Lino and David M. comments. I'm not submitting this because it'd just cause merge conflicts, but something you could do one day is remove the AQ_DIMOF macro and ju

Re: [PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-04 Thread Pavel Belous
On 04.05.2017 21:27, David Arcari wrote: On 05/04/2017 01:09 PM, Pavel Belous wrote: On 04.05.2017 19:51, David Miller wrote: From: Lino Sanfilippo Date: Thu, 4 May 2017 18:48:12 +0200 Hi Pavel, On 04.05.2017 18:33, Pavel Belous wrote: From: Pavel Belous This patch fixes the crash th

Re: [PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-04 Thread David Arcari
On 05/04/2017 01:09 PM, Pavel Belous wrote: > > > On 04.05.2017 19:51, David Miller wrote: >> From: Lino Sanfilippo >> Date: Thu, 4 May 2017 18:48:12 +0200 >> >>> Hi Pavel, >>> >>> On 04.05.2017 18:33, Pavel Belous wrote: From: Pavel Belous This patch fixes the crash that happens

Re: [PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-04 Thread Joe Perches
On Thu, 2017-05-04 at 20:08 +0300, Pavel Belous wrote: > I will prepare another patch with Lino and David M. comments. I'm not submitting this because it'd just cause merge conflicts, but something you could do one day is remove the AQ_DIMOF macro and just use ARRAY_SIZE directly. --- drivers/net

Re: [PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-04 Thread Pavel Belous
On 04.05.2017 19:51, David Miller wrote: From: Lino Sanfilippo Date: Thu, 4 May 2017 18:48:12 +0200 Hi Pavel, On 04.05.2017 18:33, Pavel Belous wrote: From: Pavel Belous This patch fixes the crash that happens when driver tries to collect statistics from already released "aq_vec" object.

Re: [PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-04 Thread Pavel Belous
On 04.05.2017 20:00, David Arcari wrote: Hi Pavel, On 05/04/2017 12:33 PM, Pavel Belous wrote: From: Pavel Belous This patch fixes the crash that happens when driver tries to collect statistics from already released "aq_vec" object. Fixes: 97bde5c4f909 ("net: ethernet: aquantia: Support fo

Re: [PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-04 Thread David Arcari
Hi Pavel, On 05/04/2017 12:33 PM, Pavel Belous wrote: > From: Pavel Belous > > This patch fixes the crash that happens when driver tries to collect > statistics > from already released "aq_vec" object. > > Fixes: 97bde5c4f909 ("net: ethernet: aquantia: Support for NIC-specific code") > Signed-

Re: [PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-04 Thread David Miller
From: Lino Sanfilippo Date: Thu, 4 May 2017 18:48:12 +0200 > Hi Pavel, > > On 04.05.2017 18:33, Pavel Belous wrote: >> From: Pavel Belous >> >> This patch fixes the crash that happens when driver tries to collect >> statistics >> from already released "aq_vec" object. >> >> Fixes: 97bde5c4f9

Re: [PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-04 Thread Lino Sanfilippo
Hi Pavel, On 04.05.2017 18:33, Pavel Belous wrote: > From: Pavel Belous > > This patch fixes the crash that happens when driver tries to collect > statistics > from already released "aq_vec" object. > > Fixes: 97bde5c4f909 ("net: ethernet: aquantia: Support for NIC-specific code") > Signed-off

[PATCH] aquantia: Fix "ethtool -S" crash when adapter down.

2017-05-04 Thread Pavel Belous
From: Pavel Belous This patch fixes the crash that happens when driver tries to collect statistics from already released "aq_vec" object. Fixes: 97bde5c4f909 ("net: ethernet: aquantia: Support for NIC-specific code") Signed-off-by: Pavel Belous --- drivers/net/ethernet/aquantia/atlantic/aq_nic