mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
seq_tab_next() should increase position index
[ Upstream commit 70a87287c821e9721b62463777f55ba588ac4623 ] 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 <vvs@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
772c96a03b
commit
b2fd13e9ce
@ -66,8 +66,7 @@ static void *seq_tab_start(struct seq_file *seq, loff_t *pos)
|
||||
static void *seq_tab_next(struct seq_file *seq, void *v, loff_t *pos)
|
||||
{
|
||||
v = seq_tab_get_idx(seq->private, *pos + 1);
|
||||
if (v)
|
||||
++*pos;
|
||||
++(*pos);
|
||||
return v;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user