summaryrefslogtreecommitdiffstats
path: root/net/can/raw.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-18 13:53:16 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-18 13:53:16 +0200
commitcdbfc557c43ea1f1f9b7062300ecb1254969814b (patch)
tree255f1cf62cea2c3dec208799a00a116e714a6128 /net/can/raw.c
parent4d8cc874d7ed43eda72765e9c0e141e170fee4f3 (diff)
parent5b664cb235e97afbf34db9c4d77f08ebd725335e (diff)
Merge branch 'linus' into x86/cleanups
Diffstat (limited to 'net/can/raw.c')
-rw-r--r--net/can/raw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/can/raw.c b/net/can/raw.c
index 69877b8e7e9..3e46ee36a1a 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -632,6 +632,9 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock,
} else
ifindex = ro->ifindex;
+ if (size != sizeof(struct can_frame))
+ return -EINVAL;
+
dev = dev_get_by_index(&init_net, ifindex);
if (!dev)
return -ENXIO;