From: Wolfgang Grandegger Date: Thu, 7 Jan 2010 09:43:06 +0000 (+0000) Subject: can: mscan: fix improper return if dlc < 8 in start_xmit function X-Git-Tag: v2.6.34-rc1~233^2~621 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d4b6faf7d1818e9a52ae9f068ab4ffd9c3be923;p=pandora-kernel.git can: mscan: fix improper return if dlc < 8 in start_xmit function The start_xmit function of the MSCAN Driver did return improperly if the CAN dlc check failed (skb not freed and invalid return code). This patch adds a proper check of the frame lenght and data size and returns now correctly. The invalid skb packets are dropped silently as suggested by David Miller in the thread "[RFC] ndo_validate_skb: Let the netdev check a valid skb content" on the netdev mailing list. Furthermore, a typo has been fixed. Signed-off-by: Wolfgang Grandegger Reviewed-by: Wolfram Sang Signed-off-by: David S. Miller --- Reading git-diff-tree failed