]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-net: fix data corruption with OOM
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 28 Oct 2009 11:03:38 +0000 (04:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Oct 2009 11:03:38 +0000 (04:03 -0700)
commitb6a90598adffd46be045dfb6eeadfd66daf94e2a
tree9cdee187b2e64d2535e2c1192c68fd77e925c06b
parent0602518afbd155fcd1d1a2db7a1cdc4cdf8863d5
virtio-net: fix data corruption with OOM

virtio net used to unlink skbs from send queues on error,
but ever since e93d646a6c3ef84a9b1081139aac6be48c4f581c
we do not do this. This causes guest data corruption and crashes
with vhost since net core can requeue the skb or free it without
it being taken off the list.

This patch fixes this by queueing the skb after successful
transmit.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c