James, Martin, I did not get any feedback from Cisco developers, could you please pick up this patch? Unfortunately I have no related hardware and cannot verify the patch. Usually you can observe following related problems: - read after lseek beyond end of file, described by NeilBrown in commit 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code and interface") "dd if=<AFFECTED_FILE> bs=1000 skip=1" will incorrectly generate whole last line - read after lseek on into middle of last line will output expected rest of last line but then repeat whole last line once again. - If .show() function generates multi-line output following bash script will never finish. $ q=;while read -r r;do echo "$((++q)) $r";done < AFFECTED_FILE On 1/24/20 8:56 AM, Vasily Averin wrote: > 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@xxxxxxxxxxxxx> > --- > drivers/scsi/snic/snic_debugfs.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/scsi/snic/snic_debugfs.c b/drivers/scsi/snic/snic_debugfs.c > index 2b34936..b20c724 100644 > --- a/drivers/scsi/snic/snic_debugfs.c > +++ b/drivers/scsi/snic/snic_debugfs.c > @@ -419,6 +419,7 @@ void snic_stats_debugfs_init(struct snic *snic) > static void * > snic_trc_seq_next(struct seq_file *sfp, void *data, loff_t *pos) > { > + (*pos)++; > return NULL; > } > >