aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev_addr_lists.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2012-04-02 22:33:02 +0000
committerDavid S. Miller <davem@davemloft.net>2012-04-03 17:23:23 -0400
commit2def16ae6b0c77571200f18ba4be049b03d75579 (patch)
tree8b5bf927cba74c94e2a155b64052df07621917b8 /net/core/dev_addr_lists.c
parentMerge branch 'drm-fixes-intel' of git://people.freedesktop.org/~airlied/linux (diff)
downloadlinux-dev-2def16ae6b0c77571200f18ba4be049b03d75579.tar.xz
linux-dev-2def16ae6b0c77571200f18ba4be049b03d75579.zip
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 'net/core/dev_addr_lists.c')
-rw-r--r--net/core/dev_addr_lists.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/dev_addr_lists.c b/net/core/dev_addr_lists.c
index 29c07fef9228..626698f0db8b 100644
--- a/net/core/dev_addr_lists.c
+++ b/net/core/dev_addr_lists.c
@@ -696,7 +696,8 @@ static const struct seq_operations dev_mc_seq_ops = {
static int dev_mc_seq_open(struct inode *inode, struct file *file)
{
- return dev_seq_open_ops(inode, file, &dev_mc_seq_ops);
+ return seq_open_net(inode, file, &dev_mc_seq_ops,
+ sizeof(struct seq_net_private));
}
static const struct file_operations dev_mc_seq_fops = {