summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2020-01-23 10:11:28 +0300
committerDavid S. Miller <davem@davemloft.net>2020-01-24 11:42:18 +0100
commit1e3f9f073c47bee7c23e77316b07bc12338c5bba (patch)
tree78057a5bedd2e5aafd2e6afcd478a14c415e3ec8 /net
parent8bf7092021f283944f0c5f4c364853201c45c611 (diff)
neigh_stat_seq_next() should increase position index
if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/neighbour.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 920784a9b7ff..789a73aa7bd8 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -3290,6 +3290,7 @@ static void *neigh_stat_seq_next(struct seq_file *seq, void *v, loff_t *pos)
*pos = cpu+1;
return per_cpu_ptr(tbl->stats, cpu);
}
+ (*pos)++;
return NULL;
}