can: c_can: Do not access skb after net_receive_skb()
authorThomas Gleixner <tglx@linutronix.de>
Fri, 11 Apr 2014 08:13:12 +0000 (08:13 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 24 Apr 2014 20:08:56 +0000 (22:08 +0200)
commit9c64863a49bd23c5a3a983680eb500f7796c81be
tree37e1a62c1345857573118b06587f3defc4e94948
parentef1d2e286a2d8876e03a3f58ea1a1f549727e518
can: c_can: Do not access skb after net_receive_skb()

There is no guarantee that the skb is in the same state after calling
net_receive_skb(). It might be freed or reused. Not really harmful as
its a read access, except you turn on the proper debugging options
which catch a use after free.

The whole can subsystem is full of this. Copy and paste ....

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/c_can/c_can.c