aboutsummaryrefslogtreecommitdiffstats
path: root/net/compat.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:38:13 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:38:13 -0500
commitcb18eccff48ef3986d1072964590bce6fec705fb (patch)
tree777fb1d15e0281341e1e02c9803d989538d346f2 /net/compat.c
parentc827ba4cb49a30ce581201fd0ba2be77cde412c7 (diff)
parent5ef213f6842277ee1df5659f59fac0ffc9beb411 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (45 commits) [IPV4]: Restore multipath routing after rt_next changes. [XFRM] IPV6: Fix outbound RO transformation which is broken by IPsec tunnel patch. [NET]: Reorder fields of struct dst_entry [DECNET]: Convert decnet route to use the new dst_entry 'next' pointer [IPV6]: Convert ipv6 route to use the new dst_entry 'next' pointer [IPV4]: Convert ipv4 route to use the new dst_entry 'next' pointer [NET]: Introduce union in struct dst_entry to hold 'next' pointer [DECNET]: fix misannotation of linkinfo_dn [DECNET]: FRA_{DST,SRC} are le16 for decnet [UDP]: UDP can use sk_hash to speedup lookups [NET]: Fix whitespace errors. [NET] XFRM: Fix whitespace errors. [NET] X25: Fix whitespace errors. [NET] WANROUTER: Fix whitespace errors. [NET] UNIX: Fix whitespace errors. [NET] TIPC: Fix whitespace errors. [NET] SUNRPC: Fix whitespace errors. [NET] SCTP: Fix whitespace errors. [NET] SCHED: Fix whitespace errors. [NET] RXRPC: Fix whitespace errors. ...
Diffstat (limited to 'net/compat.c')
-rw-r--r--net/compat.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/compat.c b/net/compat.c
index 52d32f1bc728..9c970749a3b0 100644
--- a/net/compat.c
+++ b/net/compat.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * 32bit Socket syscall emulation. Based on arch/sparc64/kernel/sys_sparc32.c. 2 * 32bit Socket syscall emulation. Based on arch/sparc64/kernel/sys_sparc32.c.
3 * 3 *
4 * Copyright (C) 2000 VA Linux Co 4 * Copyright (C) 2000 VA Linux Co
@@ -8,7 +8,7 @@
8 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 8 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
9 * Copyright (C) 2000 Hewlett-Packard Co. 9 * Copyright (C) 2000 Hewlett-Packard Co.
10 * Copyright (C) 2000 David Mosberger-Tang <davidm@hpl.hp.com> 10 * Copyright (C) 2000 David Mosberger-Tang <davidm@hpl.hp.com>
11 * Copyright (C) 2000,2001 Andi Kleen, SuSE Labs 11 * Copyright (C) 2000,2001 Andi Kleen, SuSE Labs
12 */ 12 */
13 13
14#include <linux/kernel.h> 14#include <linux/kernel.h>
@@ -225,14 +225,14 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat
225 return 0; /* XXX: return error? check spec. */ 225 return 0; /* XXX: return error? check spec. */
226 } 226 }
227 227
228 if (level == SOL_SOCKET && type == SO_TIMESTAMP) { 228 if (level == SOL_SOCKET && type == SO_TIMESTAMP) {
229 struct timeval *tv = (struct timeval *)data; 229 struct timeval *tv = (struct timeval *)data;
230 ctv.tv_sec = tv->tv_sec; 230 ctv.tv_sec = tv->tv_sec;
231 ctv.tv_usec = tv->tv_usec; 231 ctv.tv_usec = tv->tv_usec;
232 data = &ctv; 232 data = &ctv;
233 len = sizeof(struct compat_timeval); 233 len = sizeof(struct compat_timeval);
234 } 234 }
235 235
236 cmlen = CMSG_COMPAT_LEN(len); 236 cmlen = CMSG_COMPAT_LEN(len);
237 if(kmsg->msg_controllen < cmlen) { 237 if(kmsg->msg_controllen < cmlen) {
238 kmsg->msg_flags |= MSG_CTRUNC; 238 kmsg->msg_flags |= MSG_CTRUNC;
@@ -419,7 +419,7 @@ static int do_set_attach_filter(struct socket *sock, int level, int optname,
419 char __user *optval, int optlen) 419 char __user *optval, int optlen)
420{ 420{
421 struct compat_sock_fprog __user *fprog32 = (struct compat_sock_fprog __user *)optval; 421 struct compat_sock_fprog __user *fprog32 = (struct compat_sock_fprog __user *)optval;
422 struct sock_fprog __user *kfprog = compat_alloc_user_space(sizeof(struct sock_fprog)); 422 struct sock_fprog __user *kfprog = compat_alloc_user_space(sizeof(struct sock_fprog));
423 compat_uptr_t ptr; 423 compat_uptr_t ptr;
424 u16 len; 424 u16 len;
425 425
@@ -610,14 +610,14 @@ asmlinkage long compat_sys_socketcall(int call, u32 __user *args)
610 int ret; 610 int ret;
611 u32 a[6]; 611 u32 a[6];
612 u32 a0, a1; 612 u32 a0, a1;
613 613
614 if (call < SYS_SOCKET || call > SYS_RECVMSG) 614 if (call < SYS_SOCKET || call > SYS_RECVMSG)
615 return -EINVAL; 615 return -EINVAL;
616 if (copy_from_user(a, args, nas[call])) 616 if (copy_from_user(a, args, nas[call]))
617 return -EFAULT; 617 return -EFAULT;
618 a0 = a[0]; 618 a0 = a[0];
619 a1 = a[1]; 619 a1 = a[1];
620 620
621 switch(call) { 621 switch(call) {
622 case SYS_SOCKET: 622 case SYS_SOCKET:
623 ret = sys_socket(a0, a1, a[2]); 623 ret = sys_socket(a0, a1, a[2]);