diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2014-03-04 10:07:52 -0500 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2014-03-06 10:30:44 -0500 |
commit | 932602e238329da99f8482c1b721549531fbfe7f (patch) | |
tree | e32b5562a688ad853783adc1c8c14475be00c681 /fs/compat_ioctl.c | |
parent | 5d70a59637911e84687b421afeb4c111a579fb2b (diff) |
fs/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types
Some fs compat system calls have unsigned long parameters instead of
compat_ulong_t.
In order to allow the COMPAT_SYSCALL_DEFINE macro generate code that
performs proper zero and sign extension convert all 64 bit parameters
their corresponding 32 bit counterparts.
compat_sys_io_getevents() is a bit different: the non-compat version
has signed parameters for the "min_nr" and "nr" parameters while the
compat version has unsigned parameters.
So change this as well. For all practical purposes this shouldn't make
any difference (doesn't fix a real bug).
Also introduce a generic compat_aio_context_t type which can be used
everywhere.
The access_ok() check within compat_sys_io_getevents() got also removed
since the non-compat sys_io_getevents() should be able to handle
everything anyway.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'fs/compat_ioctl.c')
-rw-r--r-- | fs/compat_ioctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 3881610b6438..e82289047272 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -1538,9 +1538,10 @@ static int compat_ioctl_check_table(unsigned int xcmd) | |||
1538 | return ioctl_pointer[i] == xcmd; | 1538 | return ioctl_pointer[i] == xcmd; |
1539 | } | 1539 | } |
1540 | 1540 | ||
1541 | asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd, | 1541 | COMPAT_SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, |
1542 | unsigned long arg) | 1542 | compat_ulong_t, arg32) |
1543 | { | 1543 | { |
1544 | unsigned long arg = arg32; | ||
1544 | struct fd f = fdget(fd); | 1545 | struct fd f = fdget(fd); |
1545 | int error = -EBADF; | 1546 | int error = -EBADF; |
1546 | if (!f.file) | 1547 | if (!f.file) |