Re: [PATCH net] virtio-net: correct error handling of virtqueue_kick()
From: David Miller
Date: Thu Mar 27 2014 - 13:14:31 EST
From: Jason Wang <jasowang@xxxxxxxxxx>
Date: Wed, 26 Mar 2014 13:03:00 +0800
> Current error handling of virtqueue_kick() was wrong in two places:
> - The skb were freed immediately when virtqueue_kick() fail during
> xmit. This may lead double free since the skb was not detached from
> the virtqueue.
> - try_fill_recv() returns false when virtqueue_kick() fail. This will
> lead unnecessary rescheduling of refill work.
>
> Actually, it's safe to just ignore the kick failure in those two
> places. So this patch fixes this by partially revert commit
> 67975901183799af8e93ec60e322f9e2a1940b9b.
>
> Fixes 67975901183799af8e93ec60e322f9e2a1940b9b
> (virtio_net: verify if virtqueue_kick() succeeded).
>
> Cc: Heinz Graalfs <graalfs@xxxxxxxxxxxxxxxxxx>
> Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
> Cc: Michael S. Tsirkin <mst@xxxxxxxxxx>
> Signed-off-by: Jason Wang <jasowang@xxxxxxxxxx>
Applied and queued up for -stable, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/