]> git.baikalelectronics.ru Git - kernel.git/commit
fold checks into iterate_and_advance()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 9 May 2016 15:54:48 +0000 (11:54 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 9 May 2016 18:04:29 +0000 (14:04 -0400)
commit671752ab10ffe119255fd1a9d917c1ec744e3f39
treebd644bbc841c64c265d72c74d9c82d9df61d4064
parentc7ba323184d6458143c7daa89626988138d00b3c
fold checks into iterate_and_advance()

they are open-coded in all users except iov_iter_advance(), and there
they wouldn't be a bad idea either - as it is, iov_iter_advance(i, 0)
ends up dereferencing potentially past the end of iovec array.  It
doesn't do anything with the value it reads, and very unlikely to
trigger an oops on dereference, but it is not impossible.

Reported-by: Jiri Slaby <jslaby@suse.cz>
Reported-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
lib/iov_iter.c