mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 22:51:35 +00:00
gve: Properly handle errors in gve_assign_qpl
Ignored errors would result in crash.
Fixes: ede3fcf5ec
("gve: Add support for raw addressing to the rx path")
Signed-off-by: Catherine Sullivan <csully@google.com>
Signed-off-by: Jeroen de Borst <jeroendb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
922aa9bcac
commit
d4b111fda6
@ -104,8 +104,14 @@ static int gve_prefill_rx_pages(struct gve_rx_ring *rx)
|
||||
if (!rx->data.page_info)
|
||||
return -ENOMEM;
|
||||
|
||||
if (!rx->data.raw_addressing)
|
||||
if (!rx->data.raw_addressing) {
|
||||
rx->data.qpl = gve_assign_rx_qpl(priv);
|
||||
if (!rx->data.qpl) {
|
||||
kvfree(rx->data.page_info);
|
||||
rx->data.page_info = NULL;
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < slots; i++) {
|
||||
if (!rx->data.raw_addressing) {
|
||||
struct page *page = rx->data.qpl->pages[i];
|
||||
|
Loading…
Reference in New Issue
Block a user