]> git.hungrycats.org Git - linux/commitdiff
[NET]: Various /proc/net/* files may drop some data.
authorHideaki Yoshifuji <yoshfuji@linux-ipv6.org>
Thu, 11 Sep 2003 09:41:05 +0000 (02:41 -0700)
committerHideaki Yoshifuji <yoshfuji@linux-ipv6.org>
Thu, 11 Sep 2003 09:41:05 +0000 (02:41 -0700)
net/ipv4/igmp.c
net/ipv4/raw.c
net/ipv4/route.c
net/ipv6/ip6_flowlabel.c
net/ipv6/mcast.c
net/ipv6/raw.c

index 7fca75a657f6c40794c8d8ce4f70b78920eb4c22..c11943136d44de80fe2157b42677cfa23f30c1bd 100644 (file)
@@ -2162,7 +2162,7 @@ static struct ip_mc_list *igmp_mc_get_idx(struct seq_file *seq, loff_t pos)
 static void *igmp_mc_seq_start(struct seq_file *seq, loff_t *pos)
 {
        read_lock(&dev_base_lock);
-       return *pos ? igmp_mc_get_idx(seq, *pos) : SEQ_START_TOKEN;
+       return *pos ? igmp_mc_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
 }
 
 static void *igmp_mc_seq_next(struct seq_file *seq, void *v, loff_t *pos)
@@ -2337,7 +2337,7 @@ static struct ip_sf_list *igmp_mcf_get_idx(struct seq_file *seq, loff_t pos)
 static void *igmp_mcf_seq_start(struct seq_file *seq, loff_t *pos)
 {
        read_lock(&dev_base_lock);
-       return *pos ? igmp_mcf_get_idx(seq, *pos) : SEQ_START_TOKEN;
+       return *pos ? igmp_mcf_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
 }
 
 static void *igmp_mcf_seq_next(struct seq_file *seq, void *v, loff_t *pos)
index a7bbd7e154213de9697a2aa49492403625165e2d..366e651ab0a50b93c60a8c32e1f447f7124637c9 100644 (file)
@@ -736,7 +736,7 @@ static struct sock *raw_get_idx(struct seq_file *seq, loff_t pos)
 static void *raw_seq_start(struct seq_file *seq, loff_t *pos)
 {
        read_lock(&raw_v4_lock);
-       return *pos ? raw_get_idx(seq, *pos) : SEQ_START_TOKEN;
+       return *pos ? raw_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
 }
 
 static void *raw_seq_next(struct seq_file *seq, void *v, loff_t *pos)
index e11909b232777581265aa522b8bdc204017186d3..027a4f9206de7b6b3f0106ff17854d002dad4536 100644 (file)
@@ -259,7 +259,7 @@ static struct rtable *rt_cache_get_idx(struct seq_file *seq, loff_t pos)
 
 static void *rt_cache_seq_start(struct seq_file *seq, loff_t *pos)
 {
-       return *pos ? rt_cache_get_idx(seq, *pos) : SEQ_START_TOKEN;
+       return *pos ? rt_cache_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
 }
 
 static void *rt_cache_seq_next(struct seq_file *seq, void *v, loff_t *pos)
index ff65ddd44f99465623704ced9bf13edecf4e49ed..cfcd53d957790349ede305ee1f0db870ca250d51 100644 (file)
@@ -603,7 +603,7 @@ static struct ip6_flowlabel *ip6fl_get_idx(struct seq_file *seq, loff_t pos)
 static void *ip6fl_seq_start(struct seq_file *seq, loff_t *pos)
 {
        read_lock_bh(&ip6_fl_lock);
-       return *pos ? ip6fl_get_idx(seq, *pos) : SEQ_START_TOKEN;
+       return *pos ? ip6fl_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
 }
 
 static void *ip6fl_seq_next(struct seq_file *seq, void *v, loff_t *pos)
index b42d1253a9feb6d83a289915adc29e411558b724..f792678fe8ef7b3bb0a7caabc2ac3c87b6dfe360 100644 (file)
@@ -2278,7 +2278,7 @@ static struct ip6_sf_list *igmp6_mcf_get_idx(struct seq_file *seq, loff_t pos)
 static void *igmp6_mcf_seq_start(struct seq_file *seq, loff_t *pos)
 {
        read_lock(&dev_base_lock);
-       return *pos ? igmp6_mcf_get_idx(seq, *pos) : SEQ_START_TOKEN;
+       return *pos ? igmp6_mcf_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
 }
 
 static void *igmp6_mcf_seq_next(struct seq_file *seq, void *v, loff_t *pos)
index 2dd2024eb38f50b1f32c1f2d058a82374d13b910..72a50e4da2fe73b5376fad1aa50f7ba74e7b135e 100644 (file)
@@ -961,7 +961,7 @@ static struct sock *raw6_get_idx(struct seq_file *seq, loff_t pos)
 static void *raw6_seq_start(struct seq_file *seq, loff_t *pos)
 {
        read_lock(&raw_v6_lock);
-       return *pos ? raw6_get_idx(seq, *pos) : SEQ_START_TOKEN;
+       return *pos ? raw6_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
 }
 
 static void *raw6_seq_next(struct seq_file *seq, void *v, loff_t *pos)