DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2 0/3] net/xsc: fix issues reported by GCC analyzer
@ 2026-11-17  6:39 WanRenyong
  0 siblings, 0 replies; 3+ messages in thread
From: WanRenyong @ 2026-11-17  6:39 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, nana, qianr, zhangxx, xudw

[-- Attachment #1: Type: text/plain, Size: 694 bytes --]

On 2026-11-16 10:46 -0800, Stephen Hemminger wrote:
> Error: the leak is not fixed. xsc_dev_uninit() is only called from
> the probe error path in xsc_ethdev_init(), where the jumbo buffer
> can never have been allocated (rte_zmalloc'd xdev, port never
> started). The normal remove path is xsc_ethdev_uninit(), which does
> not call xsc_dev_uninit(); it frees xdev directly:
>
>         ret |= xsc_ethdev_close(eth_dev);
>         xsc_dev_pct_uninit(priv->xdev);
>         rte_free(priv->xdev);
>
> So the buffer still leaks on every device removal.

Hi Stephen,

Thanks for the review. Noted, I will send the next version of the series
shortly.

Thanks,
Renyong

[-- Attachment #2: Type: text/html, Size: 4405 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH v2 0/3] net/xsc: fix issues reported by GCC analyzer
@ 2026-11-16  6:58 Renyong Wan
  2026-11-16 18:46 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Renyong Wan @ 2026-11-16  6:58 UTC (permalink / raw)
  To: dev; +Cc: stephen, nana, qianr, zhangxx, xudw

v2 addresses the issues raised in the AI review of v1:
- allocate the jumbo buffer once per device, fail the queue setup when
  there is no IOVA, and free it on device close
- fix the leak in xsc_dev_init() and the unchecked rte_malloc_socket()
- rename the jumbo buffer fields, they held the opposite of what their
  names say

Renyong Wan (3):
  net/xsc: fix jumbo buffer allocation and leak
  net/xsc: fix leak and missing null check
  net/xsc: rename jumbo buffer fields

 drivers/net/xsc/xsc_dev.c    |  2 ++
 drivers/net/xsc/xsc_dev.h    |  4 +--
 drivers/net/xsc/xsc_ethdev.c |  6 ++++
 drivers/net/xsc/xsc_rx.c     | 53 ++++++++++++++++++++----------------
 4 files changed, 39 insertions(+), 26 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-17  6:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17  6:39 [PATCH v2 0/3] net/xsc: fix issues reported by GCC analyzer WanRenyong
  -- strict thread matches above, loose matches on Subject: below --
2026-11-16  6:58 Renyong Wan
2026-11-16 18:46 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox