gve: Alloc before freeing when adjusting queues
authorShailend Chand <shailend@google.com>
Mon, 22 Jan 2024 18:26:31 +0000 (18:26 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 24 Jan 2024 01:41:31 +0000 (17:41 -0800)
commit5f08cd3d6423e7ea81467e7216426d65b65297fa
tree58bcad1900de9242aa140dce1fa3d2189bfd9a9e
parent92a6d7a4010c3e84894f4fb7f481e648f0b12e53
gve: Alloc before freeing when adjusting queues

Previously, existing queues were being freed before the resources for
the new queues were being allocated. This would take down the interface
if someone were to attempt to change queue counts under a resource
crunch.

Signed-off-by: Shailend Chand <shailend@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Jeroen de Borst <jeroendb@google.com>
Link: https://lore.kernel.org/r/20240122182632.1102721-6-shailend@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/google/gve/gve_main.c