Skip to content

Commit 70a8728

Browse files
vaverindavem330
authored andcommitted
seq_tab_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]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2bec445 commit 70a8728

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ static void *seq_tab_start(struct seq_file *seq, loff_t *pos)
7070
static void *seq_tab_next(struct seq_file *seq, void *v, loff_t *pos)
7171
{
7272
v = seq_tab_get_idx(seq->private, *pos + 1);
73-
if (v)
74-
++*pos;
73+
++(*pos);
7574
return v;
7675
}
7776

0 commit comments

Comments
 (0)