]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/can/raw.c
xen: implement Xen-specific spinlocks
[linux-2.6-omap-h63xx.git] / net / can / raw.c
index 69877b8e7e9c772be9479bced40b6b8273662322..3e46ee36a1aaf819b8ed4a8d7c6afcb7b8614948 100644 (file)
@@ -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;