From 49845d361006cf43dd0c95459f1a2ac93ad534e1 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Wed, 9 Dec 2009 20:58:16 +0000 Subject: [PATCH] --- yaml --- r: 175568 b: refs/heads/master c: 60c2ffd3d2cf12008747d920ae118df119006003 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/compat.h | 2 +- trunk/net/compat.c | 12 +++++------- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index c8aac03e2d87..5321b7d4eb33 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ccdddf500f2b1b8e88ac8e3d4dfc15cce9f73886 +refs/heads/master: 60c2ffd3d2cf12008747d920ae118df119006003 diff --git a/trunk/include/net/compat.h b/trunk/include/net/compat.h index 3c7d4e38fa1d..28d5428ec6a2 100644 --- a/trunk/include/net/compat.h +++ b/trunk/include/net/compat.h @@ -46,7 +46,7 @@ extern asmlinkage long compat_sys_sendmsg(int,struct compat_msghdr __user *,unsi extern asmlinkage long compat_sys_recvmsg(int,struct compat_msghdr __user *,unsigned); extern asmlinkage long compat_sys_recvmmsg(int, struct compat_mmsghdr __user *, unsigned, unsigned, - struct timespec __user *); + struct compat_timespec __user *); extern asmlinkage long compat_sys_getsockopt(int, int, int, char __user *, int __user *); extern int put_cmsg_compat(struct msghdr*, int, int, int, void *); diff --git a/trunk/net/compat.c b/trunk/net/compat.c index e1a56ade803b..c4d9131a5872 100644 --- a/trunk/net/compat.c +++ b/trunk/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;