Stephane Grosjean 27a4b8bbe9 can: peak_usb: fix potential double kfree_skb()
commit fee6a8923ae0d318a7f7950c6c6c28a96cea099b upstream.

When closing the CAN device while tx skbs are inflight, echo skb could
be released twice. By calling close_candev() before unlinking all
pending tx urbs, then the internal echo_skb[] array is fully and
correctly cleared before the USB write callback and, therefore,
can_get_echo_skb() are called, for each aborted URB.

Fixes: bb4785551f64 ("can: usb: PEAK-System Technik USB adapters driver core")
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-16 10:13:50 +02:00
..
2019-08-06 19:05:21 +02:00
2019-05-14 19:18:42 +02:00
2019-08-16 10:13:47 +02:00
2019-07-31 07:28:24 +02:00
2019-05-31 06:47:21 -07:00