]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] janitor: x86_64/sys_ia32
authorRandy Dunlap <rddunlap@osdl.org>
Sat, 6 Sep 2003 07:37:05 +0000 (00:37 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Sat, 6 Sep 2003 07:37:05 +0000 (00:37 -0700)
This patch catches insures proper return values from
copy_to/from_user calls.

From: Ron Gage <ron@rongage.org>

arch/x86_64/ia32/sys_ia32.c

index 9e3aaa491ecd84ed1872fb722db29daf114b7800..68587f8cb865c8cc119197a52e1136a64334fdf5 100644 (file)
@@ -1798,7 +1798,7 @@ static int nfs_getfs32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32
  */
 static int nfs_getfh32_res_trans(union nfsctl_res *kres, union nfsctl_res32 *res32)
 {
-       return copy_to_user(res32, kres, sizeof(*res32));
+       return copy_to_user(res32, kres, sizeof(*res32)) ? -EFAULT : 0;
 }
 
 long asmlinkage sys32_nfsservctl(int cmd, struct nfsctl_arg32 *arg32, union nfsctl_res32 *res32)