Revision 33844e665104b169a3a7732bdcddb40e4f82b335 authored by Al Viro on 22 December 2016, 02:55:02 UTC, committed by Al Viro on 23 December 2016, 04:00:22 UTC
Problem similar to ones dealt with in "fold checks into iterate_and_advance()"
and followups, except that in this case we really want to do nothing when
asked for zero-length operation - unlike zero-length iterate_and_advance(),
zero-length iterate_all_kinds() has no side effects, and callers are simpler
that way.

That got exposed when copy_from_iter_full() had been used by tipc, which
builds an msghdr with zero payload and (now) feeds it to a primitive
based on iterate_all_kinds() instead of iterate_and_advance().

Reported-by: Jon Maloy <jon.maloy@ericsson.com>
Tested-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent c00d2c7
History
File Mode Size
governors
Kconfig -rw-r--r-- 1.0 KB
Kconfig.arm -rw-r--r-- 2.4 KB
Kconfig.mips -rw-r--r-- 618 bytes
Kconfig.powerpc -rw-r--r-- 480 bytes
Makefile -rw-r--r-- 1.2 KB
coupled.c -rw-r--r-- 25.6 KB
cpuidle-arm.c -rw-r--r-- 3.7 KB
cpuidle-at91.c -rw-r--r-- 1.6 KB
cpuidle-big_little.c -rw-r--r-- 6.7 KB
cpuidle-calxeda.c -rw-r--r-- 2.2 KB
cpuidle-clps711x.c -rw-r--r-- 1.5 KB
cpuidle-cps.c -rw-r--r-- 4.4 KB
cpuidle-exynos.c -rw-r--r-- 3.4 KB
cpuidle-kirkwood.c -rw-r--r-- 2.3 KB
cpuidle-mvebu-v7.c -rw-r--r-- 3.3 KB
cpuidle-powernv.c -rw-r--r-- 9.1 KB
cpuidle-pseries.c -rw-r--r-- 5.9 KB
cpuidle-ux500.c -rw-r--r-- 3.2 KB
cpuidle-zynq.c -rw-r--r-- 2.0 KB
cpuidle.c -rw-r--r-- 15.6 KB
cpuidle.h -rw-r--r-- 2.0 KB
driver.c -rw-r--r-- 9.4 KB
dt_idle_states.c -rw-r--r-- 6.5 KB
dt_idle_states.h -rw-r--r-- 177 bytes
governor.c -rw-r--r-- 2.1 KB
sysfs.c -rw-r--r-- 16.1 KB

back to top