On Thu, Jan 30, 2020 at 01:23:21PM +0300, Vasily Averin wrote: > If seq_file .next function does not change position index, > read after non-zero lseek can generate unexpected output. Is it unwanted or unexpected? Unexpected would be mean random output. I don't think that is the case. Please describe more throughly. > For /sys/kernel/security/tpm0/binary_bios_measurements: > 1) read after lseek beyond end of file generates whole last line. > 2) read after lseek to middle of last line generates > expected end of last line and unexpected whole last line once again. > > Cc: stable@xxxxxxxxxxxxxxx > Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code ...") > No empty line here. > https://bugzilla.kernel.org/show_bug.cgi?id=206283 "Link: https://bugzilla.kernel.org/show_bug.cgi?id=206283" /Jarkko