]> git.karo-electronics.de Git - karo-tx-linux.git/commit
can: add limit for nframes and clean up signed/unsigned variables
authorOliver Hartkopp <socketcan@hartkopp.net>
Wed, 11 Aug 2010 23:12:35 +0000 (16:12 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Aug 2010 23:43:44 +0000 (16:43 -0700)
commit2afc67ed4d15ae5f82327aa426dfe2366d57c5e5
tree0406d380e1c6a7a0284723c0ca955baff2befb27
parentc57bbdaff4f0831cc97d6265a0d293c42b4e86ce
can: add limit for nframes and clean up signed/unsigned variables

[ Upstream commit 5b75c4973ce779520b9d1e392483207d6f842cde ]

This patch adds a limit for nframes as the number of frames in TX_SETUP and
RX_SETUP are derived from a single byte multiplex value by default.
Use-cases that would require to send/filter more than 256 CAN frames should
be implemented in userspace for complexity reasons anyway.

Additionally the assignments of unsigned values from userspace to signed
values in kernelspace and vice versa are fixed by using unsigned values in
kernelspace consistently.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Reported-by: Ben Hawkes <hawkes@google.com>
Acked-by: Urs Thuermann <urs.thuermann@volkswagen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/can/bcm.c