]> git.baikalelectronics.ru Git - kernel.git/commit
net: fix /proc/net/dev regression
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 2 Apr 2012 22:33:02 +0000 (22:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Apr 2012 21:23:23 +0000 (17:23 -0400)
commit47acbbdb9b5ef46744abcb65e2c8cb4855d28b5a
tree8b5bf927cba74c94e2a155b64052df07621917b8
parent46e448b6523bebd053363ac31bd39c6ddf9dc765
net: fix /proc/net/dev regression

Commit 2b20580976e (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 3160f87c4 (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>
include/linux/netdevice.h
net/core/dev.c
net/core/dev_addr_lists.c