You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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>
This commit is contained in:
committed by
Linus Torvalds
parent
8aeba3c62a
commit
9ad11ab48b
@@ -559,12 +559,12 @@ asmlinkage long sys_newfstatat(int dfd, char __user *filename,
|
||||
struct stat __user *statbuf, int flag);
|
||||
asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf,
|
||||
int bufsiz);
|
||||
asmlinkage long compat_sys_futimesat(int dfd, char __user *filename,
|
||||
asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename,
|
||||
struct compat_timeval __user *t);
|
||||
asmlinkage long compat_sys_newfstatat(int dfd, char __user * filename,
|
||||
asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename,
|
||||
struct compat_stat __user *statbuf,
|
||||
int flag);
|
||||
asmlinkage long compat_sys_openat(int dfd, const char __user *filename,
|
||||
asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename,
|
||||
int flags, int mode);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user