]> 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>
Wed, 25 Apr 2012 01:04:51 +0000 (11:04 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 30 Apr 2012 05:17:43 +0000 (15:17 +1000)
commit0d2a57f5ae0acf935f4d1b589a200f1ca64ed061
treeb2f4754a51d040b7b17ee0fdc9f179762f4177b2
parentf887e7ad041db933a9c61cef56a9c4719c7fde9a
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