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: Roy Yang <email@example.com>
Tested-by: Roy Yang <firstname.lastname@example.org>
(cherry picked from commit fda41945bbd95964e876b1aad85a4a6103a83539)
Tested-by: Cusky Presubmit Bot <email@example.com>
(cherry picked from commit c5758405d507a39977ff5de416f9149f555dcefb)
Main-Branch-Verified: Cusky Presubmit Bot <firstname.lastname@example.org>
1 file changed