summaryrefslogtreecommitdiffstats
path: root/net/can/raw.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2010-05-06 10:56:07 +1000
committerJames Morris <jmorris@namei.org>2010-05-06 10:56:07 +1000
commit0ffbe2699cda6afbe08501098dff8a8c2fe6ae09 (patch)
tree81b1a2305d16c873371b65c5a863c0268036cefe /net/can/raw.c
parent4e5d6f7ec3833c0da9cf34fa5c53c6058c5908b6 (diff)
parent7ebd467551ed6ae200d7835a84bbda0dcadaa511 (diff)
downloadop-kernel-dev-0ffbe2699cda6afbe08501098dff8a8c2fe6ae09.zip
op-kernel-dev-0ffbe2699cda6afbe08501098dff8a8c2fe6ae09.tar.gz
Merge branch 'master' into next
Diffstat (limited to 'net/can/raw.c')
-rw-r--r--net/can/raw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/can/raw.c b/net/can/raw.c
index abca920..da99cf1 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -45,6 +45,7 @@
#include <linux/init.h>
#include <linux/uio.h>
#include <linux/net.h>
+#include <linux/slab.h>
#include <linux/netdevice.h>
#include <linux/socket.h>
#include <linux/if_arp.h>
@@ -444,7 +445,7 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,
return -EFAULT;
}
} else if (count == 1) {
- if (copy_from_user(&sfilter, optval, optlen))
+ if (copy_from_user(&sfilter, optval, sizeof(sfilter)))
return -EFAULT;
}
OpenPOWER on IntegriCloud