]> git.itanic.dy.fi Git - linux-stable/commit
net: fix /proc/net/dev regression
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 2 Apr 2012 22:33:02 +0000 (22:33 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Apr 2012 17:16:53 +0000 (10:16 -0700)
commit3f97bf1dddac33d09627fd941d0ee3a2f57898d7
treef508e6be98d86f50b9995cfcf14623309f87e14c
parent36de412a4eb52d3558b946f7055e83c19c31b1ba
net: fix /proc/net/dev regression

[ Upstream commit 2def16ae6b0c77571200f18ba4be049b03d75579 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/netdevice.h
net/core/dev.c
net/core/dev_addr_lists.c