Thread (95 messages) 95 messages, 8 authors, 2015-01-26

Re: [PATCH v3 1/4] can: kvaser_usb: Don't free packets when tight on URBs

flat view

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2015-01-08 09:59:57
Also in: linux-can, lkml

On 01/05/2015 06:49 PM, Ahmed S. Darwish wrote:
From: Ahmed S. Darwish <redacted>

Flooding the Kvaser CAN to USB dongle with multiple reads and
writes in high frequency caused seemingly-random panics in the
kernel.

On further inspection, it seems the driver erroneously freed the
to-be-transmitted packet upon getting tight on URBs and returning
NETDEV_TX_BUSY, leading to invalid memory writes and double frees
at a later point in time.

Note:

Finding no more URBs/transmit-contexts and returning NETDEV_TX_BUSY
is a driver bug in and out of itself: it means that our start/stop
queue flow control is broken.

This patch only fixes the (buggy) error handling code; the root
cause shall be fixed in a later commit.

Signed-off-by: Ahmed S. Darwish <redacted>
Acked-by: Olivier Sobrie <redacted>
Applied 1-3 to can/master + added stable on Cc.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help