virtio_net: fix oom handling on tx
commit0094153a72107b3097818f1221c1f49c2eb0db90
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 2 Jul 2010 16:34:01 +0000 (2 16:34 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:29:51 +0000 (2 10:29 -0700)
tree12435ec41cd56d2fe635d9fb76aeba11db20aca2
parent8fc3550ab44cbec695d2798ac7327642fa72b8f0
virtio_net: fix oom handling on tx

commit 58eba97d0774c69b1cf3e5a8ac74419409d1abbf upstream.

virtio net will never try to overflow the TX ring, so the only reason
add_buf may fail is out of memory. Thus, we can not stop the
device until some request completes - there's no guarantee anything
at all is outstanding.

Make the error message clearer as well: error here does not
indicate queue full.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/virtio_net.c