patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] devargs: fix leak on hotplug failure
@ 2022-04-14 11:27 David Marchand
  2022-05-12  7:06 ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2022-04-14 11:27 UTC (permalink / raw)
  To: dev; +Cc: stable, Xueming Li, Ray Kinsella, Gaetan Rivet

Caught by ASan, if a secondary process tried to attach a device with an
incorrect driver name, devargs was leaked.

Fixes: 64051bb1f144 ("devargs: unify scratch buffer storage")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/eal/common/eal_common_dev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index c0ee4e442f..9d913e5478 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -180,8 +180,10 @@ local_dev_probe(const char *devargs, struct rte_device **new_dev)
 	return ret;
 
 err_devarg:
-	if (rte_devargs_remove(da) != 0)
+	if (rte_devargs_remove(da) != 0) {
 		rte_devargs_reset(da);
+		free(da);
+	}
 	return ret;
 }
 
-- 
2.23.0


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

* Re: [PATCH] devargs: fix leak on hotplug failure
  2022-04-14 11:27 [PATCH] devargs: fix leak on hotplug failure David Marchand
@ 2022-05-12  7:06 ` David Marchand
  2022-05-19 16:21   ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2022-05-12  7:06 UTC (permalink / raw)
  To: Xueming Li, Gaetan Rivet; +Cc: dpdk stable, dev, Ray Kinsella

On Thu, Apr 14, 2022 at 1:28 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> Caught by ASan, if a secondary process tried to attach a device with an
> incorrect driver name, devargs was leaked.
>
> Fixes: 64051bb1f144 ("devargs: unify scratch buffer storage")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Review please?


-- 
David Marchand


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

* Re: [PATCH] devargs: fix leak on hotplug failure
  2022-05-12  7:06 ` David Marchand
@ 2022-05-19 16:21   ` David Marchand
  0 siblings, 0 replies; 3+ messages in thread
From: David Marchand @ 2022-05-19 16:21 UTC (permalink / raw)
  To: Xueming Li, Gaetan Rivet; +Cc: dpdk stable, dev, Ray Kinsella, Thomas Monjalon

On Thu, May 12, 2022 at 9:06 AM David Marchand
<david.marchand@redhat.com> wrote:
> On Thu, Apr 14, 2022 at 1:28 PM David Marchand
> <david.marchand@redhat.com> wrote:
> >
> > Caught by ASan, if a secondary process tried to attach a device with an
> > incorrect driver name, devargs was leaked.
> >
> > Fixes: 64051bb1f144 ("devargs: unify scratch buffer storage")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> Review please?

No objection, the fix has been around for one month.
Applied.


-- 
David Marchand


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

end of thread, other threads:[~2022-05-19 16:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-14 11:27 [PATCH] devargs: fix leak on hotplug failure David Marchand
2022-05-12  7:06 ` David Marchand
2022-05-19 16:21   ` David Marchand

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git