gve: Fix bug in gve_rx_alloc/free_ring
In gve_rx_free_ring, now that we are setting the pagecount high, rather
than just freeing the page with put_page we need to make sure we
subtract off the bias first.
In gve_rx_alloc_ring, we need to unfill the ring if the allocation fails
to properly cleanup.
In gve_prefill_buffers, if a page allocation failed we weren't cleaning
up properly. In addition to freeing the page we need to reduce the page
count so we should be using free_buffer. We should also be actually
iterating over the buffers that were successfully alloced not using the
local page and addr vars.
Signed-off-by: Catherine Sullivan <firstname.lastname@example.org>
Reviewed-by: Oleksandr Tymoshenko <email@example.com>
Tested-by: Vaibhav Rustagi <firstname.lastname@example.org>
1 file changed