]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] compat: fix compat_sys_openat and friends
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 2 Feb 2006 05:11:51 +0000 (16:11 +1100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 2 Feb 2006 06:04:33 +0000 (22:04 -0800)
commit21432ef3ac558097867f77ac5abc581a7cab9e43
treeb0b06f4455d9796fc5003add2067f2dbc225fc53
parenta24fbad723a4784e27b208d3a539332f0ad7fde2
[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>
fs/compat.c
include/linux/syscalls.h