diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-04-08 07:36:36 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-04-08 07:37:18 -0400 |
commit | ca7e0c612005937a4a5a75d3fed90459993de65c (patch) | |
tree | b574fc0f0189b52ffc87ba20c418228db556faa1 /net/ipv4/af_inet.c | |
parent | 8141d0050d76e5695011b5ab577ec66fb51a998c (diff) | |
parent | f5284e7635787224dda1a2bf82a4c56b1c75671f (diff) |
Merge branch 'linus' into perf/core
Semantic conflict: arch/x86/kernel/cpu/perf_event_intel_ds.c
Merge reason: pick up latest fixes, fix the conflict
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 33b7dffa7732..f71357422380 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -86,6 +86,7 @@ | |||
86 | #include <linux/poll.h> | 86 | #include <linux/poll.h> |
87 | #include <linux/netfilter_ipv4.h> | 87 | #include <linux/netfilter_ipv4.h> |
88 | #include <linux/random.h> | 88 | #include <linux/random.h> |
89 | #include <linux/slab.h> | ||
89 | 90 | ||
90 | #include <asm/uaccess.h> | 91 | #include <asm/uaccess.h> |
91 | #include <asm/system.h> | 92 | #include <asm/system.h> |
@@ -530,6 +531,8 @@ int inet_dgram_connect(struct socket *sock, struct sockaddr * uaddr, | |||
530 | { | 531 | { |
531 | struct sock *sk = sock->sk; | 532 | struct sock *sk = sock->sk; |
532 | 533 | ||
534 | if (addr_len < sizeof(uaddr->sa_family)) | ||
535 | return -EINVAL; | ||
533 | if (uaddr->sa_family == AF_UNSPEC) | 536 | if (uaddr->sa_family == AF_UNSPEC) |
534 | return sk->sk_prot->disconnect(sk, flags); | 537 | return sk->sk_prot->disconnect(sk, flags); |
535 | 538 | ||
@@ -573,6 +576,9 @@ int inet_stream_connect(struct socket *sock, struct sockaddr *uaddr, | |||
573 | int err; | 576 | int err; |
574 | long timeo; | 577 | long timeo; |
575 | 578 | ||
579 | if (addr_len < sizeof(uaddr->sa_family)) | ||
580 | return -EINVAL; | ||
581 | |||
576 | lock_sock(sk); | 582 | lock_sock(sk); |
577 | 583 | ||
578 | if (uaddr->sa_family == AF_UNSPEC) { | 584 | if (uaddr->sa_family == AF_UNSPEC) { |