diff options
Diffstat (limited to 'net/sctp/proc.c')
-rw-r--r-- | net/sctp/proc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/sctp/proc.c b/net/sctp/proc.c index ef8ba77a5bea..09e16c2b5c17 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c | |||
@@ -73,13 +73,17 @@ static const struct snmp_mib sctp_snmp_list[] = { | |||
73 | /* Display sctp snmp mib statistics(/proc/net/sctp/snmp). */ | 73 | /* Display sctp snmp mib statistics(/proc/net/sctp/snmp). */ |
74 | static int sctp_snmp_seq_show(struct seq_file *seq, void *v) | 74 | static int sctp_snmp_seq_show(struct seq_file *seq, void *v) |
75 | { | 75 | { |
76 | unsigned long buff[SCTP_MIB_MAX]; | ||
76 | struct net *net = seq->private; | 77 | struct net *net = seq->private; |
77 | int i; | 78 | int i; |
78 | 79 | ||
80 | memset(buff, 0, sizeof(unsigned long) * SCTP_MIB_MAX); | ||
81 | |||
82 | snmp_get_cpu_field_batch(buff, sctp_snmp_list, | ||
83 | net->sctp.sctp_statistics); | ||
79 | for (i = 0; sctp_snmp_list[i].name != NULL; i++) | 84 | for (i = 0; sctp_snmp_list[i].name != NULL; i++) |
80 | seq_printf(seq, "%-32s\t%ld\n", sctp_snmp_list[i].name, | 85 | seq_printf(seq, "%-32s\t%ld\n", sctp_snmp_list[i].name, |
81 | snmp_fold_field(net->sctp.sctp_statistics, | 86 | buff[i]); |
82 | sctp_snmp_list[i].entry)); | ||
83 | 87 | ||
84 | return 0; | 88 | return 0; |
85 | } | 89 | } |