diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2012-04-02 18:33:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-03 17:23:23 -0400 |
commit | 2def16ae6b0c77571200f18ba4be049b03d75579 (patch) | |
tree | 8b5bf927cba74c94e2a155b64052df07621917b8 /include/linux | |
parent | 01627d968c8b5e2810fe8c417b406b968297c236 (diff) |
net: fix /proc/net/dev regression
Commit f04565ddf52 (dev: use name hash for dev_seq_ops) added a second
regression, as some devices are missing from /proc/net/dev if many
devices are defined.
When seq_file buffer is filled, the last ->next/show() method is
canceled (pos value is reverted to value prior ->next() call)
Problem is after above commit, we dont restart the lookup at right
position in ->start() method.
Fix this by removing the internal 'pos' pointer added in commit, since
we need to use the 'loff_t *pos' provided by seq_file layer.
This also reverts commit 5cac98dd0 (net: Fix corruption
in /proc/*/net/dev_mcast), since its not needed anymore.
Reported-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Mihai Maruseac <mmaruseac@ixiacom.com>
Tested-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/netdevice.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 1f77540bdc95..5cbaa20f1659 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -2604,8 +2604,6 @@ extern void net_disable_timestamp(void); | |||
2604 | extern void *dev_seq_start(struct seq_file *seq, loff_t *pos); | 2604 | extern void *dev_seq_start(struct seq_file *seq, loff_t *pos); |
2605 | extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos); | 2605 | extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos); |
2606 | extern void dev_seq_stop(struct seq_file *seq, void *v); | 2606 | extern void dev_seq_stop(struct seq_file *seq, void *v); |
2607 | extern int dev_seq_open_ops(struct inode *inode, struct file *file, | ||
2608 | const struct seq_operations *ops); | ||
2609 | #endif | 2607 | #endif |
2610 | 2608 | ||
2611 | extern int netdev_class_create_file(struct class_attribute *class_attr); | 2609 | extern int netdev_class_create_file(struct class_attribute *class_attr); |