diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2010-05-10 05:59:37 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-05-10 08:20:42 -0400 |
| commit | dbb6be6d5e974c42bbecd183effaa0df69e1dd8b (patch) | |
| tree | 5735cb47e70853d057a9881dd0ce44b83e88fa63 /net/ipv4/af_inet.c | |
| parent | 6a867a395558a7f882d041783e4cdea6744ca2bf (diff) | |
| parent | b57f95a38233a2e73b679bea4a5453a1cc2a1cc9 (diff) | |
Merge branch 'linus' into timers/core
Reason: Further posix_cpu_timer patches depend on mainline changes
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
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) { |
