From: Vasily Averin Date: Tue, 25 Feb 2020 07:05:59 +0000 (+0300) Subject: netfilter: synproxy: synproxy_cpu_seq_next should increase position index X-Git-Tag: v4.19.111~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fbcbed7c45189b5f7f3309aaed8fc81c37e9bba;p=platform%2Fkernel%2Flinux-rpi.git netfilter: synproxy: synproxy_cpu_seq_next should increase position index commit bb71f846a0002239f7058c84f1496648ff4a5c20 upstream. If .next function does not change position index, following .show function will repeat output related to current position index. Cc: stable@vger.kernel.org Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code ...") Link: https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/netfilter/nf_synproxy_core.c b/net/netfilter/nf_synproxy_core.c index 8ff4d22..353a2aa 100644 --- a/net/netfilter/nf_synproxy_core.c +++ b/net/netfilter/nf_synproxy_core.c @@ -273,7 +273,7 @@ static void *synproxy_cpu_seq_next(struct seq_file *seq, void *v, loff_t *pos) *pos = cpu + 1; return per_cpu_ptr(snet->stats, cpu); } - + (*pos)++; return NULL; }