From: Joshua Washington <joshwash@google.com>
To: Joshua Washington <joshwash@google.com>,
Rushil Gupta <rushilg@google.com>,
Jeroen de Borst <jeroendb@google.com>
Cc: dev@dpdk.org, blasko@google.com, jtranoleary@google.com, stable@dpdk.org
Subject: [PATCH v3 1/8] net/gve: fix RSS config memory leak on close
Date: Fri, 9 Oct 2026 17:59:33 -0700 [thread overview]
Message-ID: <20261010005942.560881-2-joshwash@google.com> (raw)
In-Reply-To: <20261010005942.560881-1-joshwash@google.com>
From: Jasper Tran O'Leary <jtranoleary@google.com>
Free rss_config resources during device close to avoid leaking
redirection table and hash key memory. Also, memset the entire
gve_rss_config struct to 0 to avoid leaking RSS hash function or hash
types.
Fixes: 63ef54569760 ("net/gve: support RSS configuration update")
Cc: stable@dpdk.org
Signed-off-by: Jasper Tran O'Leary <jtranoleary@google.com>
Signed-off-by: Joshua Washington <joshwash@google.com>
---
v3:
- Clear out entire gve_rss_config struct when freeing.
- Reorder to make this patch first in the series.
- Update Fixes tag to earliest commit with the issue.
---
drivers/net/gve/gve_ethdev.c | 1 +
| 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c
index c990920a4d..80623979a8 100644
--- a/drivers/net/gve/gve_ethdev.c
+++ b/drivers/net/gve/gve_ethdev.c
@@ -699,6 +699,7 @@ gve_teardown_device_resources(struct gve_priv *priv)
gve_free_ptype_lut_dqo(priv);
gve_free_counter_array(priv);
gve_free_irq_db(priv);
+ gve_free_rss_config(&priv->rss_config);
gve_clear_device_resources_ok(priv);
}
--git a/drivers/net/gve/gve_rss.c b/drivers/net/gve/gve_rss.c
index 67b910ed22..4084d7955f 100644
--- a/drivers/net/gve/gve_rss.c
+++ b/drivers/net/gve/gve_rss.c
@@ -71,9 +71,8 @@ void
gve_free_rss_config(struct gve_rss_config *gve_rss_conf)
{
rte_free(gve_rss_conf->indir);
- gve_rss_conf->indir = NULL;
rte_free(gve_rss_conf->key);
- gve_rss_conf->key = NULL;
+ memset(gve_rss_conf, 0, sizeof(*gve_rss_conf));
}
int
--
2.56.0.170.g584c36229d-goog
next prev parent reply other threads:[~2026-10-10 0:59 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 2:51 [PATCH 0/8] gve: precursor control plane changes before bare-metal support Joshua Washington
2026-10-03 2:51 ` [PATCH 1/8] net/gve: refactor ethdev for control ops interface Joshua Washington
2026-10-03 2:51 ` [PATCH 2/8] net/gve: rename doorbell BAR variable to be more generic Joshua Washington
2026-10-03 2:51 ` [PATCH 3/8] net/gve: split default queue counts into Tx and Rx Joshua Washington
2026-10-03 2:51 ` [PATCH 4/8] net/gve: clean Tx queue directly in dqo Joshua Washington
2026-10-03 2:51 ` [PATCH 5/8] net/gve: update RSS config just after successful programming Joshua Washington
2026-10-03 2:51 ` [PATCH 6/8] net/gve: add RSS cache boolean flag Joshua Washington
2026-10-03 2:51 ` [PATCH 7/8] net/gve: fix RSS config memory leak on close Joshua Washington
2026-10-03 2:51 ` [PATCH 8/8] net/gve: refactor timestamp support to clock read type Joshua Washington
2026-10-03 16:29 ` [PATCH 0/8] gve: precursor control plane changes before bare-metal support Stephen Hemminger
2026-10-05 19:39 ` [PATCH v2 " Joshua Washington
2026-10-05 19:39 ` [PATCH v2 1/8] net/gve: refactor ethdev for control ops interface Joshua Washington
2026-10-05 19:39 ` [PATCH v2 2/8] net/gve: rename doorbell BAR variable to be more generic Joshua Washington
2026-10-05 19:39 ` [PATCH v2 3/8] net/gve: split default queue counts into Tx and Rx Joshua Washington
2026-10-05 19:39 ` [PATCH v2 4/8] net/gve: clean Tx queue directly in dqo Joshua Washington
2026-10-05 19:39 ` [PATCH v2 5/8] net/gve: update RSS config just after successful programming Joshua Washington
2026-10-05 19:39 ` [PATCH v2 6/8] net/gve: add RSS cache boolean flag Joshua Washington
2026-10-05 19:39 ` [PATCH v2 7/8] net/gve: fix RSS config memory leak on close Joshua Washington
2026-10-05 19:39 ` [PATCH v2 8/8] net/gve: refactor timestamp support to clock read type Joshua Washington
2026-10-06 14:19 ` [PATCH v2 0/8] gve: precursor control plane changes before bare-metal support Stephen Hemminger
2026-10-06 15:10 ` Stephen Hemminger
2026-10-07 20:11 ` Joshua Washington
2026-10-10 0:59 ` [PATCH v3 " Joshua Washington
2026-10-10 0:59 ` Joshua Washington [this message]
2026-10-10 0:59 ` [PATCH v3 2/8] net/gve: refactor ethdev for control ops interface Joshua Washington
2026-10-10 0:59 ` [PATCH v3 3/8] net/gve: rename doorbell BAR variable to be more generic Joshua Washington
2026-10-10 0:59 ` [PATCH v3 4/8] net/gve: split default queue counts into Tx and Rx Joshua Washington
2026-10-10 0:59 ` [PATCH v3 5/8] net/gve: clean Tx queue directly in dqo Joshua Washington
2026-10-10 0:59 ` [PATCH v3 6/8] net/gve: update RSS config just after successful programming Joshua Washington
2026-10-10 0:59 ` [PATCH v3 7/8] net/gve: add RSS cache boolean flag Joshua Washington
2026-10-10 0:59 ` [PATCH v3 8/8] net/gve: refactor timestamp support to clock read type Joshua Washington
2026-10-10 18:24 ` [PATCH v3 0/8] gve: precursor control plane changes before bare-metal support Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261010005942.560881-2-joshwash@google.com \
--to=joshwash@google.com \
--cc=blasko@google.com \
--cc=dev@dpdk.org \
--cc=jeroendb@google.com \
--cc=jtranoleary@google.com \
--cc=rushilg@google.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox