diff options
Diffstat (limited to 'net/compat.c')
-rw-r--r-- | net/compat.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/net/compat.c b/net/compat.c index 8d739053afe4..12728b17a226 100644 --- a/net/compat.c +++ b/net/compat.c | |||
@@ -743,6 +743,18 @@ asmlinkage long compat_sys_recvmsg(int fd, struct compat_msghdr __user *msg, uns | |||
743 | return sys_recvmsg(fd, (struct msghdr __user *)msg, flags | MSG_CMSG_COMPAT); | 743 | return sys_recvmsg(fd, (struct msghdr __user *)msg, flags | MSG_CMSG_COMPAT); |
744 | } | 744 | } |
745 | 745 | ||
746 | asmlinkage long compat_sys_recv(int fd, void __user *buf, size_t len, unsigned flags) | ||
747 | { | ||
748 | return sys_recv(fd, buf, len, flags | MSG_CMSG_COMPAT); | ||
749 | } | ||
750 | |||
751 | asmlinkage long compat_sys_recvfrom(int fd, void __user *buf, size_t len, | ||
752 | unsigned flags, struct sockaddr __user *addr, | ||
753 | int __user *addrlen) | ||
754 | { | ||
755 | return sys_recvfrom(fd, buf, len, flags | MSG_CMSG_COMPAT, addr, addrlen); | ||
756 | } | ||
757 | |||
746 | asmlinkage long compat_sys_socketcall(int call, u32 __user *args) | 758 | asmlinkage long compat_sys_socketcall(int call, u32 __user *args) |
747 | { | 759 | { |
748 | int ret; | 760 | int ret; |
@@ -788,10 +800,11 @@ asmlinkage long compat_sys_socketcall(int call, u32 __user *args) | |||
788 | ret = sys_sendto(a0, compat_ptr(a1), a[2], a[3], compat_ptr(a[4]), a[5]); | 800 | ret = sys_sendto(a0, compat_ptr(a1), a[2], a[3], compat_ptr(a[4]), a[5]); |
789 | break; | 801 | break; |
790 | case SYS_RECV: | 802 | case SYS_RECV: |
791 | ret = sys_recv(a0, compat_ptr(a1), a[2], a[3]); | 803 | ret = compat_sys_recv(a0, compat_ptr(a1), a[2], a[3]); |
792 | break; | 804 | break; |
793 | case SYS_RECVFROM: | 805 | case SYS_RECVFROM: |
794 | ret = sys_recvfrom(a0, compat_ptr(a1), a[2], a[3], compat_ptr(a[4]), compat_ptr(a[5])); | 806 | ret = compat_sys_recvfrom(a0, compat_ptr(a1), a[2], a[3], |
807 | compat_ptr(a[4]), compat_ptr(a[5])); | ||
795 | break; | 808 | break; |
796 | case SYS_SHUTDOWN: | 809 | case SYS_SHUTDOWN: |
797 | ret = sys_shutdown(a0,a1); | 810 | ret = sys_shutdown(a0,a1); |