https://github.com/torvalds/linux
Revision f01d1d546abb2f4028b5299092f529eefb01253a authored by Alexey Dobriyan on 05 February 2009, 21:30:05 UTC, committed by Linus Torvalds on 05 February 2009, 22:18:14 UTC
lseek() further than length of the file will leave stale ->index
(second-to-last during iteration). Next seq_read() will not notice
that ->f_pos is big enough to return 0, but will print last item
as if ->f_pos is pointing to it.

Introduced in commit cb510b8172602a66467f3551b4be1911f5a7c8c2
aka "seq_file: more atomicity in traverse()".

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 33da889
History
Tip revision: f01d1d546abb2f4028b5299092f529eefb01253a authored by Alexey Dobriyan on 05 February 2009, 21:30:05 UTC
seq_file: fix big-enough lseek() + read()
Tip revision: f01d1d5
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore -rw-r--r-- 867 bytes
.mailmap -rw-r--r-- 3.9 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 91.3 KB
Kbuild -rw-r--r-- 2.4 KB
MAINTAINERS -rw-r--r-- 106.5 KB
Makefile -rw-r--r-- 53.2 KB
README -rw-r--r-- 16.7 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top