iov_iter_advance() fix
iov_iter_advance() fix

iov_iter_advance() skips over zero-length iovecs, however it does not properly
terminate at the end of the iovec array.  Fix this by checking against
i->count before we skip a zero-length iov.

The bug was reproduced with a test program that continually randomly creates
iovs to writev.  The fix was also verified with the same program and also it
could verify that the correct data was contained in the file after each
writev.

Signed-off-by: Nick Piggin <24829078df5003d9dd1dd871ca2aeb0b1cf95ef4@suse.de>
Tested-by: "Kevin Coffman" <fa5137ca2e6837f0e9ccf21dc631b857e5c9496f@citi.umich.edu>
Cc: "Alexey Dobriyan" <b99bff5923d24d2fb8e844db9dac7cd59203da1d@gmail.com>
Cc: <4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@kernel.org>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs