[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20161014.212128.1303887902157786593.davem@davemloft.net>
Date: Fri, 14 Oct 2016 21:21:28 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: vlad@...rklevich.net
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] ethtool: Zero memory allocated for statistics
From: Vlad Tsyrklevich <vlad@...rklevich.net>
Date: Fri, 14 Oct 2016 11:59:18 +0200
> enic_get_ethtool_stats()
Looknig merely at this shows the real problem.
We don't propagate and handle errors for this method.
And that's what we should fix, making the get_ethtool_stats() method
return an integer error.
Then ethtool_get_stats() should return any non-zero value provided by
ops->get_ethtool_stats() and not attempt to copy any bytes of 'data'
to userspace in that case.
Powered by blists - more mailing lists