Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16c0ae0a authored by Vasily Averin's avatar Vasily Averin Committed by Greg Kroah-Hartman
Browse files

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: 1f4aace6 ("fs/seq_file.c: simplify seq_file iteration code ...")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=206283


Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1c6e7570
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -267,7 +267,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;
}