[PATCH v2] net/netvsc: fix event buffer leak on realloc failure

Stephen Hemminger stephen at networkplumber.org
Thu Oct 29 20:43:25 CET 2026


On Thu, 29 Oct 2026 16:54:52 +0000
Chen Zhao <ch3nzhao at 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 at dpdk.org
> Signed-off-by: Chen Zhao <ch3nzhao at 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.


More information about the dev mailing list