diff options
author | Patrick McHardy <kaber@trash.net> | 2010-04-20 10:02:01 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-04-20 10:02:01 -0400 |
commit | 62910554656cdcd6b6f84a5154c4155aae4ca231 (patch) | |
tree | dcf14004f6fd2ef7154362ff948bfeba0f3ea92d /net/can | |
parent | 22265a5c3c103cf8c50be62e6c90d045eb649e6d (diff) | |
parent | ab9304717f7624c41927f442e6b6d418b2d8b3e4 (diff) |
Merge branch 'master' of /repos/git/net-next-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
net/ipv6/netfilter/ip6t_REJECT.c
net/netfilter/xt_limit.c
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/can')
-rw-r--r-- | net/can/bcm.c | 4 | ||||
-rw-r--r-- | net/can/raw.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/net/can/bcm.c b/net/can/bcm.c index e32af52238a2..907dc871fac8 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include <linux/can.h> | 56 | #include <linux/can.h> |
57 | #include <linux/can/core.h> | 57 | #include <linux/can/core.h> |
58 | #include <linux/can/bcm.h> | 58 | #include <linux/can/bcm.h> |
59 | #include <linux/slab.h> | ||
59 | #include <net/sock.h> | 60 | #include <net/sock.h> |
60 | #include <net/net_namespace.h> | 61 | #include <net/net_namespace.h> |
61 | 62 | ||
@@ -1478,6 +1479,9 @@ static int bcm_connect(struct socket *sock, struct sockaddr *uaddr, int len, | |||
1478 | struct sock *sk = sock->sk; | 1479 | struct sock *sk = sock->sk; |
1479 | struct bcm_sock *bo = bcm_sk(sk); | 1480 | struct bcm_sock *bo = bcm_sk(sk); |
1480 | 1481 | ||
1482 | if (len < sizeof(*addr)) | ||
1483 | return -EINVAL; | ||
1484 | |||
1481 | if (bo->bound) | 1485 | if (bo->bound) |
1482 | return -EISCONN; | 1486 | return -EISCONN; |
1483 | 1487 | ||
diff --git a/net/can/raw.c b/net/can/raw.c index abca920440b5..da99cf153b33 100644 --- a/net/can/raw.c +++ b/net/can/raw.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/init.h> | 45 | #include <linux/init.h> |
46 | #include <linux/uio.h> | 46 | #include <linux/uio.h> |
47 | #include <linux/net.h> | 47 | #include <linux/net.h> |
48 | #include <linux/slab.h> | ||
48 | #include <linux/netdevice.h> | 49 | #include <linux/netdevice.h> |
49 | #include <linux/socket.h> | 50 | #include <linux/socket.h> |
50 | #include <linux/if_arp.h> | 51 | #include <linux/if_arp.h> |
@@ -444,7 +445,7 @@ static int raw_setsockopt(struct socket *sock, int level, int optname, | |||
444 | return -EFAULT; | 445 | return -EFAULT; |
445 | } | 446 | } |
446 | } else if (count == 1) { | 447 | } else if (count == 1) { |
447 | if (copy_from_user(&sfilter, optval, optlen)) | 448 | if (copy_from_user(&sfilter, optval, sizeof(sfilter))) |
448 | return -EFAULT; | 449 | return -EFAULT; |
449 | } | 450 | } |
450 | 451 | ||