]> www.infradead.org Git - users/willy/linux.git/commit
net: ena: Destroy correct number of xdp queues upon failure
authorDavid Arinzon <darinzon@amazon.com>
Mon, 11 Dec 2023 06:27:58 +0000 (06:27 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Dec 2023 00:07:31 +0000 (16:07 -0800)
commit41db6f99b5489a0d2ef26afe816ef0c6118d1d47
treeb3590e7df0a3a5a4350e38d49f8d2690f82f57ae
parentf99cd56230f56c8b6b33713c5be4da5d6766be1f
net: ena: Destroy correct number of xdp queues upon failure

The ena_setup_and_create_all_xdp_queues() function freed all the
resources upon failure, after creating only xdp_num_queues queues,
instead of freeing just the created ones.

In this patch, the only resources that are freed, are the ones
allocated right before the failure occurs.

Fixes: 548c4940b9f1 ("net: ena: Implement XDP_TX action")
Signed-off-by: Shahar Itzko <itzko@amazon.com>
Signed-off-by: David Arinzon <darinzon@amazon.com>
Link: https://lore.kernel.org/r/20231211062801.27891-2-darinzon@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/amazon/ena/ena_netdev.c