From: Konyukhov Aleksandr <Alexander.Konyukhov@kaspersky.com>
To: Jeroen de Borst <jeroendb@google.com>,
Rushil Gupta <rushilg@google.com>,
Joshua Washington <joshwash@google.com>,
Praveen Kaligineedi <pkaligineedi@google.com>
Cc: <dev@dpdk.org>, <stable@dpdk.org>,
Konyukhov Aleksandr <Alexander.Konyukhov@kaspersky.com>
Subject: [PATCH] net/gve: fix redundant comparison of qpl_bufs with null
Date: Fri, 25 Sep 2026 16:16:41 +0300 [thread overview]
Message-ID: <20260925131641.3895495-1-Alexander.Konyukhov@kaspersky.com> (raw)
Memory allocation for qpl->mz and qpl->qpl_bufs occurs in the
gve_alloc_queue_page_list() function under the condition
if(is_rx) qpl_bufs = rte_zmalloc else mz = gve_alloc_using_mz.
Accordingly, if qpl->mz == NULL, then memory allocation
for qpl->qpl_bufs definitely occurred. That is, in line
gve_ethdev.c:127, an additional check if (qpl->qpl_bufs)
is not required.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 9873a135bfba ("net/gve: allocate Rx QPL pages using malloc")
Cc: pkaligineedi@google.com
Signed-off-by: Konyukhov Aleksandr <Alexander.Konyukhov@kaspersky.com>
---
drivers/net/gve/gve_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c
index 3596a0236d..b72359a9af 100644
--- a/drivers/net/gve/gve_ethdev.c
+++ b/drivers/net/gve/gve_ethdev.c
@@ -124,7 +124,7 @@ gve_free_queue_page_list(struct gve_queue_page_list *qpl)
if (qpl->mz) {
rte_memzone_free(qpl->mz);
qpl->mz = NULL;
- } else if (qpl->qpl_bufs) {
+ } else {
uint32_t i;
for (i = 0; i < qpl->num_entries; i++)
--
2.43.0
next reply other threads:[~2026-09-26 9:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 13:16 Konyukhov Aleksandr [this message]
2026-09-26 16:58 ` [PATCH] net/gve: fix redundant comparison of qpl_bufs with null 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=20260925131641.3895495-1-Alexander.Konyukhov@kaspersky.com \
--to=alexander.konyukhov@kaspersky.com \
--cc=dev@dpdk.org \
--cc=jeroendb@google.com \
--cc=joshwash@google.com \
--cc=pkaligineedi@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