]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_net: fix error handling for mergeable buffers
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 28 Nov 2013 11:30:55 +0000 (13:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Dec 2013 01:27:16 +0000 (20:27 -0500)
commit0abf663fead9c254ac7f5b84c9704c95874bbf0d
tree49d4b6bc829ca1d1cb587b2a6f9acbf82a4ea2bf
parent560f677477369c31b95a6bb585c6875f37535a92
virtio_net: fix error handling for mergeable buffers

Eric Dumazet noticed that if we encounter an error
when processing a mergeable buffer, we don't
dequeue all of the buffers from this packet,
the result is almost sure to be loss of networking.

Jason Wang noticed that we also leak a page and that we don't decrement
the rq buf count, so we won't repost buffers (a resource leak).

Fix both issues.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Michael Dalton <mwdalton@google.com>
Reported-by: Eric Dumazet <edumazet@google.com>
Reported-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c