can: add missing initialisations in CAN related skbuffs
authorOliver Hartkopp <socketcan@hartkopp.net>
Mon, 23 Feb 2015 19:37:54 +0000 (20:37 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 9 May 2015 22:16:27 +0000 (23:16 +0100)
commit76eeb88f2a36e2ce5e1a302b34e9045e4829be4b
tree764b4863414fc3885e4c0298b34a2c278a70516b
parent15c039faa92920af3fa60a4be1525694762a4ccc
can: add missing initialisations in CAN related skbuffs

commit 969439016d2cf61fef53a973d7e6d2061c3793b1 upstream.

When accessing CAN network interfaces with AF_PACKET sockets e.g. by dhclient
this can lead to a skb_under_panic due to missing skb initialisations.

Add the missing initialisations at the CAN skbuff creation times on driver
level (rx path) and in the network layer (tx path).

Reported-by: Austin Schuh <austin@peloton-tech.com>
Reported-by: Daniel Steer <daniel.steer@mclaren.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
[bwh: Backported to 3.2:
 - Adjust context
 - Drop changes to alloc_canfd_skb()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/can/dev.c
net/can/af_can.c