From: Chen Zhao <ch3nzhao@gmail.com>
To: weh@microsoft.com
Cc: thomas@monjalon.net, stephen@networkplumber.org, dev@dpdk.org,
stable@dpdk.org, dpdklab@iol.unh.edu
Subject: Re: [PATCH] net/netvsc: fix event buffer leak on realloc failure
Date: Sun, 25 Oct 2026 02:18:02 +0000 [thread overview]
Message-ID: <20261025021802.3343047-1-ch3nzhao@gmail.com> (raw)
In-Reply-To: <20261025014634.3295418-1-ch3nzhao@gmail.com>
Hi,
The AI review reports a double-free and a dangling event_buf:
https://mails.dpdk.org/archives/test-report/2026-October/1069492.html
Both findings are false positives:
1. On successful reallocation, goto retry skips rte_free(old_buf).
The retry label is outside the ENOBUFS block. Each subsequent entry
into that block reinitializes old_buf from the current event_buf,
so a later allocation failure frees the current allocation, not an
address retained from a previous successful reallocation.
2. On failure, rte_realloc() returns NULL without freeing the old buffer.
That NULL return value has already been assigned to rxq->event_buf
before rte_free(old_buf) is reached. Thus event_buf is already NULL;
no additional NULL assignment is needed.
The patch preserves the existing reset-and-retry behavior while freeing
the old allocation on failure.
Thanks,
Chen
next prev parent reply other threads:[~2026-10-25 2:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 1:46 [PATCH] net/netvsc: fix event buffer leak on realloc failure Chen Zhao
2026-10-25 2:18 ` Chen Zhao [this message]
2026-10-25 15:55 ` Stephen Hemminger
2026-10-26 16:58 ` 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=20261025021802.3343047-1-ch3nzhao@gmail.com \
--to=ch3nzhao@gmail.com \
--cc=dev@dpdk.org \
--cc=dpdklab@iol.unh.edu \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
--cc=weh@microsoft.com \
/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