diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-12-09 21:58:16 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-12 00:07:56 +0100 |
commit | 60c2ffd3d2cf12008747d920ae118df119006003 (patch) | |
tree | 7b4e86de5eed6a5377bba5a875b326420fe3503b /net/compat.c | |
parent | cxgb3: Fixing EEH handlers (diff) | |
download | linux-60c2ffd3d2cf12008747d920ae118df119006003.tar.xz linux-60c2ffd3d2cf12008747d920ae118df119006003.zip |
net: fix compat_sys_recvmmsg parameter type
compat_sys_recvmmsg has a compat_timespec parameter and not a
timespec parameter. This way we also get rid of an odd cast.
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | net/compat.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/compat.c b/net/compat.c index e1a56ade803b..c4d9131a5872 100644 --- a/net/compat.c +++ b/net/compat.c @@ -754,26 +754,24 @@ asmlinkage long compat_sys_recvfrom(int fd, void __user *buf, size_t len, asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg, unsigned vlen, unsigned int flags, - struct timespec __user *timeout) + struct compat_timespec __user *timeout) { int datagrams; struct timespec ktspec; - struct compat_timespec __user *utspec; if (timeout == NULL) return __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen, flags | MSG_CMSG_COMPAT, NULL); - utspec = (struct compat_timespec __user *)timeout; - if (get_user(ktspec.tv_sec, &utspec->tv_sec) || - get_user(ktspec.tv_nsec, &utspec->tv_nsec)) + if (get_user(ktspec.tv_sec, &timeout->tv_sec) || + get_user(ktspec.tv_nsec, &timeout->tv_nsec)) return -EFAULT; datagrams = __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen, flags | MSG_CMSG_COMPAT, &ktspec); if (datagrams > 0 && - (put_user(ktspec.tv_sec, &utspec->tv_sec) || - put_user(ktspec.tv_nsec, &utspec->tv_nsec))) + (put_user(ktspec.tv_sec, &timeout->tv_sec) || + put_user(ktspec.tv_nsec, &timeout->tv_nsec))) datagrams = -EFAULT; return datagrams; |