https://github.com/torvalds/linux
Revision d64b1c878fc1e384ae53d1d40034239bc33848f4 authored by Lin Feng Shen on 20 May 2006, 21:59:49 UTC, committed by Linus Torvalds on 21 May 2006, 19:59:16 UTC
Functions compat_nfs_svc_trans, compat_nfs_clnt_trans,
compat_nfs_exp_trans, compat_nfs_getfd_trans and compat_nfs_getfs_trans,
which are called by compat_sys_nfsservctl(fs/compat.c), don't handle the
return value of access_ok properly.  access_ok return 1 when the addr is
valid, and 0 when it's not, but these functions have the reversed
understanding.  When the address is valid, they always return -EFAULT to
compat_sys_nfsservctl.

An example is to run /usr/sbin/rpc.nfsd(32bit program on Power5).  It
doesn't function as expected.  strace showes that nfsservctl returns
-EFAULT.

The patch fixes this by correcting the error handling on the return value
of access_ok in the five functions.

Signed-off-by: Lin Feng Shen <shenlinf@cn.ibm.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Acked-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 84b3932
History
Tip revision: d64b1c878fc1e384ae53d1d40034239bc33848f4 authored by Lin Feng Shen on 20 May 2006, 21:59:49 UTC
[PATCH] NFS: fix error handling on access_ok in compat_sys_nfsservctl
Tip revision: d64b1c8
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 462 bytes
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 87.4 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 67.8 KB
Makefile -rw-r--r-- 43.7 KB
README -rw-r--r-- 16.2 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top