]> git.karo-electronics.de Git - karo-tx-linux.git/commit
aio/vfs: cleanup of rw_copy_check_uvector() and compat_rw_copy_check_uvector()
authorChristopher Yeoh <cyeoh@au1.ibm.com>
Thu, 3 May 2012 05:44:56 +0000 (15:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:53:03 +0000 (15:53 +1000)
commit7de6074dff4f408cfd3baebbd4dcd9beb4ee292d
treef6c78fed4baf60d620455842ee9532dd09cf791c
parent1899079b1ab5d565f60b52550b0f502bbd5c4656
aio/vfs: cleanup of rw_copy_check_uvector() and compat_rw_copy_check_uvector()

A cleanup of rw_copy_check_uvector and compat_rw_copy_check_uvector after
changes made to support CMA in an earlier patch.

Rather than having an additional check_access parameter to these
functions, the first paramater type is overloaded to allow the caller to
specify CHECK_IOVEC_ONLY which means check that the contents of the iovec
are valid, but do not check the memory that they point to.  This is used
by process_vm_readv/writev where we need to validate that a iovec passed
to the syscall is valid but do not want to check the memory that it points
to at this point because it refers to an address space in another process.

Signed-off-by: Chris Yeoh <yeohc@au1.ibm.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/aio.c
fs/compat.c
fs/read_write.c
include/linux/compat.h
include/linux/fs.h
mm/process_vm_access.c
security/keys/compat.c
security/keys/keyctl.c