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

Commit 9d139683 authored by Vasily Averin's avatar Vasily Averin Committed by Greg Kroah-Hartman
Browse files

l2t_seq_next should increase position index

[ Upstream commit 66018a102f7756cf72db4d2704e1b93969d9d332 ]

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: default avatarVasily Averin <vvs@virtuozzo.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 993b3813
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -682,8 +682,7 @@ static void *l2t_seq_start(struct seq_file *seq, loff_t *pos)
static void *l2t_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
	v = l2t_get_idx(seq, *pos);
	if (v)
		++*pos;
	++(*pos);
	return v;
}