RE: [PATCH v2] e1000e: Don't return uninitialized stats

2017-05-19 Thread Brown, Aaron F
ber.org > Subject: Re: [PATCH v2] e1000e: Don't return uninitialized stats > > On Thu, 2017-05-18 at 10:46 -0400, David Miller wrote: > > From: Benjamin Poirier > > Date: Wed, 17 May 2017 16:24:13 -0400 > > > > > Some statistics passed to ethtool are garbage be

Re: [PATCH v2] e1000e: Don't return uninitialized stats

2017-05-19 Thread Jeff Kirsher
On Thu, 2017-05-18 at 10:46 -0400, David Miller wrote: > From: Benjamin Poirier > Date: Wed, 17 May 2017 16:24:13 -0400 > > > Some statistics passed to ethtool are garbage because > > e1000e_get_stats64() > > doesn't write them, for example: tx_heartbeat_errors. This leaks kernel > > memory to us

Re: [PATCH v2] e1000e: Don't return uninitialized stats

2017-05-18 Thread David Miller
From: Benjamin Poirier Date: Wed, 17 May 2017 16:24:13 -0400 > Some statistics passed to ethtool are garbage because e1000e_get_stats64() > doesn't write them, for example: tx_heartbeat_errors. This leaks kernel > memory to userspace and confuses users. > > Do like ixgbe and use dev_get_stats()

[PATCH v2] e1000e: Don't return uninitialized stats

2017-05-17 Thread Benjamin Poirier
Some statistics passed to ethtool are garbage because e1000e_get_stats64() doesn't write them, for example: tx_heartbeat_errors. This leaks kernel memory to userspace and confuses users. Do like ixgbe and use dev_get_stats() which first zeroes out rtnl_link_stats64. Fixes: 5944701df90d ("net: rem