lkml.org 
[lkml]   [2015]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v3 1/4] can: kvaser_usb: Don't free packets when tight on URBs
    On 01/05/2015 06:49 PM, Ahmed S. Darwish wrote:
    > From: Ahmed S. Darwish <ahmed.darwish@valeo.com>
    >
    > 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 <ahmed.darwish@valeo.com>
    > Acked-by: Olivier Sobrie <olivier@sobrie.be>

    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 |

    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2015-01-08 11:21    [W:4.149 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site