aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2006-02-02 00:11:51 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-02 01:04:33 -0500
commit9ad11ab48b1ad618bf47076e9e579f267f5306c2 (patch)
treeb0b06f4455d9796fc5003add2067f2dbc225fc53 /include
parent8aeba3c62a64e0f6527d1a0388b1a6a7060158ba (diff)
[PATCH] compat: fix compat_sys_openat and friends
Most of the 64 bit architectures will zero extend the first argument to compat_sys_{openat,newfstatat,futimesat} which will fail if the 32 bit syscall was passed AT_FDCWD (which is a small negative number). Declare the first argument to be an unsigned int which will force the correct sign extension when the internal functions are called in each case. Also, do some small white space cleanups in fs/compat.c. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/syscalls.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index fdbd436b24cc..3877209d23c3 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -559,12 +559,12 @@ asmlinkage long sys_newfstatat(int dfd, char __user *filename,
559 struct stat __user *statbuf, int flag); 559 struct stat __user *statbuf, int flag);
560asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, 560asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf,
561 int bufsiz); 561 int bufsiz);
562asmlinkage long compat_sys_futimesat(int dfd, char __user *filename, 562asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename,
563 struct compat_timeval __user *t); 563 struct compat_timeval __user *t);
564asmlinkage long compat_sys_newfstatat(int dfd, char __user * filename, 564asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename,
565 struct compat_stat __user *statbuf, 565 struct compat_stat __user *statbuf,
566 int flag); 566 int flag);
567asmlinkage long compat_sys_openat(int dfd, const char __user *filename, 567asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename,
568 int flags, int mode); 568 int flags, int mode);
569 569
570#endif 570#endif