DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Chen Zhao <ch3nzhao@gmail.com>
Cc: weh@microsoft.com, thomas@monjalon.net, dev@dpdk.org, stable@dpdk.org
Subject: Re: [PATCH v2] net/netvsc: fix event buffer leak on realloc failure
Date: Thu, 29 Oct 2026 12:43:25 -0700	[thread overview]
Message-ID: <20261029124325.2ed8837b@phoenix.local> (raw)
In-Reply-To: <20261029165452.966911-1-ch3nzhao@gmail.com>

On Thu, 29 Oct 2026 16:54:52 +0000
Chen Zhao <ch3nzhao@gmail.com> wrote:

> rte_realloc() failure overwrites event_buf and leaks the old allocation.
> Use a temporary pointer and update event_buf and event_sz only on success,
> preserving the existing buffer and size on failure.
> 
> Fixes: 1f2766b7ee02 ("net/netvsc: resize event buffer as needed")
> Cc: stable@dpdk.org
> Signed-off-by: Chen Zhao <ch3nzhao@gmail.com>
> ---

Updated the version in next-net.

Note, this is a real corner case. If rte_realloc() failed the application
is going to be failing anyway. It means malloc pool (ie hugepages) exhausted.

      parent reply	other threads:[~2026-10-29 19:43 UTC|newest]

Thread overview: 5+ 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
2026-10-25 15:55   ` Stephen Hemminger
2026-10-26 16:58 ` Stephen Hemminger
     [not found] ` <20261029165452.966911-1-ch3nzhao@gmail.com>
2026-10-29 19:43   ` Stephen Hemminger [this message]

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=20261029124325.2ed8837b@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=ch3nzhao@gmail.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.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