Commit 96d35d15 authored by Hideaki Yoshifuji's avatar Hideaki Yoshifuji

[NET]: Various /proc/net/* files may drop some data.

parent cd36c392
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment