can: add sanity checks
authorOliver Hartkopp <oliver@hartkopp.net>
Tue, 8 Jul 2008 16:34:50 +0000 (18:34 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 24 Jul 2008 16:14:06 +0000 (09:14 -0700)
commit6c5294c62492e0188fcf0d430463f900d96c0159
tree82986ac4cf33d875c2eacb7f4b77bc14bd1e12bb
parent81c5896b8f697f5135153055e15cf52da375095a
can: add sanity checks

commit 7f2d38eb7a42bea1c1df51bbdaa2ca0f0bdda07f upstream

Even though the CAN netlayer only deals with CAN netdevices, the
netlayer interface to the userspace and to the device layer should
perform some sanity checks.

This patch adds several sanity checks that mainly prevent userspace apps
to send broken content into the system that may be misinterpreted by
some other userspace application.

Signed-off-by: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
Signed-off-by: Urs Thuermann <urs.thuermann@volkswagen.de>
Acked-by: Andre Naujoks <nautsch@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/can/af_can.c
net/can/bcm.c
net/can/raw.c