]> git.baikalelectronics.ru Git - kernel.git/commit
net: snmp: fix 64bit stats on 32bit arches
authorEric Dumazet <edumazet@google.com>
Thu, 28 Apr 2016 13:33:24 +0000 (06:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Apr 2016 15:49:45 +0000 (11:49 -0400)
commit787b9efedad6b3c6ba900a2beb2b44d6c2dcd9ff
tree1c16be7df70cdc963ef59fd3e9c5ecfb553fda00
parentd10ac8e49c25598fbadd431faf4381d706d64313
net: snmp: fix 64bit stats on 32bit arches

I accidentally replaced BH disabling by preemption disabling
in SNMP_ADD_STATS64() and SNMP_UPD_PO_STATS64() on 32bit builds.

For 64bit stats on 32bit arch, we really need to disable BH,
since the "struct u64_stats_sync syncp" might be manipulated
both from process and BH contexts.

Fixes: b3e40bb7b3bb ("net: snmp: kill various STATS_USER() helpers")
Reported-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Tested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/snmp.h