linux/net/can
Oliver Hartkopp e5054135bc can: raw: check for CAN FD capable netdev in raw_sendmsg()
commit a43608fa77 upstream.

When the socket is CAN FD enabled it can handle CAN FD frame
transmissions.  Add an additional check in raw_sendmsg() as a CAN2.0 CAN
driver (non CAN FD) should never see a CAN FD frame. Due to the commonly
used can_dropped_invalid_skb() function the CAN 2.0 driver would drop
that CAN FD frame anyway - but with this patch the user gets a proper
-EINVAL return code.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
[bwh: Backported to 3.16: Keep looking up devices in init_net]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-02-11 17:53:56 +00:00
..
af_can.c can: af_can: canfd_rcv(): replace WARN_ONCE by pr_warn_once 2018-03-03 15:52:26 +00:00
af_can.h can: Fix kernel panic at security_sock_rcv_skb 2017-03-16 02:27:24 +00:00
bcm.c can: Fix kernel panic at security_sock_rcv_skb 2017-03-16 02:27:24 +00:00
gw.c can: Fix kernel panic at security_sock_rcv_skb 2017-03-16 02:27:24 +00:00
Kconfig can: Kconfig: switch on all CAN protocolls by default 2013-01-26 16:58:58 +01:00
Makefile can-gw: add netlink based CAN routing 2011-09-16 17:37:51 -04:00
proc.c can: add hash based access to single EFF frame filters 2014-05-19 09:38:24 +02:00
raw.c can: raw: check for CAN FD capable netdev in raw_sendmsg() 2019-02-11 17:53:56 +00:00