recent_seq_next should increase position index
Subsystems (2)
PATCH 3/4 recent_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 <[email protected]>
--- net/netfilter/xt_recent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/xt_recent.c +1 -1
@@ -492,12 +492,12 @@ static void *recent_seq_next(struct seq_file *seq, void *v, loff_t *pos)const struct recent_entry *e = v;const struct list_head *head = e->list.next; + (*pos)++;while (head == &t->iphash[st->bucket]) {if (++st->bucket >= ip_list_hash_size)return NULL ; head = t->iphash[st->bucket].next; } - (*pos)++; return list_entry(head, struct recent_entry, list); }
Signature · 1 line
1.8.3.1