From: Ben Hutchings Date: Fri, 2 Sep 2011 22:23:00 +0000 (+0100) Subject: sfc: Hold efx_nic::stats_lock while reading efx_nic::mac_stats X-Git-Tag: v3.4-rc1~177^2~452^2~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cb345220f135dcca24f01cc04cbb97a8242d419;p=pandora-kernel.git sfc: Hold efx_nic::stats_lock while reading efx_nic::mac_stats efx_nic::stats_lock is used to serialise stats updates, but each reader was dropping it before it finished reading efx_nic::mac_stats. If there were concurrent stats reads using procfs, or one using procfs and one using ethtool, an update could race with a read. On a 32-bit system, the reader could see word-tearing of 64-bit stats (32 bits of the old value and 32 bits of the new). Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed