summaryrefslogtreecommitdiffstats
path: root/net/ipv6/proc.c
diff options
context:
space:
mode:
authorChristian Perle <christian.perle@secunet.com>2017-06-12 10:06:57 +0200
committerDavid S. Miller <davem@davemloft.net>2017-06-12 15:53:14 +0200
commit3500cd73dff48f28f4ba80c171c4c80034d40f76 (patch)
tree254210ca403483ba2c2654c535ead8003c20358b /net/ipv6/proc.c
parentnet: ipmr: Fix some mroute forwarding issues in vrf's (diff)
downloadlinux-3500cd73dff48f28f4ba80c171c4c80034d40f76.tar.xz
linux-3500cd73dff48f28f4ba80c171c4c80034d40f76.zip
proc: snmp6: Use correct type in memset
Reading /proc/net/snmp6 yields bogus values on 32 bit kernels. Use "u64" instead of "unsigned long" in sizeof(). Fixes: 4a4857b1c81e ("proc: Reduce cache miss in snmp6_seq_show") Signed-off-by: Christian Perle <christian.perle@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/proc.c')
-rw-r--r--net/ipv6/proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index cc8e3ae9ca73..e88bcb8ff0fd 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -219,7 +219,7 @@ static void snmp6_seq_show_item64(struct seq_file *seq, void __percpu *mib,
u64 buff64[SNMP_MIB_MAX];
int i;
- memset(buff64, 0, sizeof(unsigned long) * SNMP_MIB_MAX);
+ memset(buff64, 0, sizeof(u64) * SNMP_MIB_MAX);
snmp_get_cpu_field64_batch(buff64, itemlist, mib, syncpoff);
for (i = 0; itemlist[i].name; i++)