From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: "Wang, Yipeng1" <yipeng1.wang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Gobriel, Sameh" <sameh.gobriel@intel.com>
Subject: Re: [dpdk-dev] [PATCH] member: fix memory leak on error
Date: Sat, 23 Dec 2017 11:55:17 +0000 [thread overview]
Message-ID: <a566866c-db67-4357-775d-5832b4d9daab@intel.com> (raw)
In-Reply-To: <D2C4A16CA39F7F4E8E384D204491D7A6445B26CC@ORSMSX105.amr.corp.intel.com>
On 22-Dec-17 6:33 PM, Wang, Yipeng1 wrote:
>> -----Original Message-----
>> From: Burakov, Anatoly
>> Yep, i can see that now. Didn't think to look inside rte_member_free()
>> :/ However, you're creating a race condition there - you're unlocking a
>> tailq, and then locking (and unlocking) it again inside
>> rte_member_free() - it probably needs _thread_unsafe() functions that
>> you can call from behind the lock.
>>
>> --
>
> Thank you Anatoly,
>
> I realize that rte_member_free does not do anything good here. As a fix, I think the following should work. Is there any other concern?
>
Yes, that should work. Table creation is the last step that can cause an
error, so if we're there, we already know that we couldn't have
allocated it, so there's no need to deallocate those, and simple
rte_free(setsum) should do. I'll submit a v2?
--
Thanks,
Anatoly
next prev parent reply other threads:[~2017-12-23 11:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-21 17:50 Anatoly Burakov
2017-12-22 0:01 ` Wang, Yipeng1
2017-12-22 9:20 ` Burakov, Anatoly
2017-12-22 18:33 ` Wang, Yipeng1
2017-12-23 11:55 ` Burakov, Anatoly [this message]
2017-12-26 17:23 ` Wang, Yipeng1
2017-12-22 0:07 ` Wang, Yipeng1
2018-01-12 17:23 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
2018-01-16 17:14 ` Wang, Yipeng1
2018-01-18 23:40 ` Thomas Monjalon
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=a566866c-db67-4357-775d-5832b4d9daab@intel.com \
--to=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=sameh.gobriel@intel.com \
--cc=yipeng1.wang@intel.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;
as well as URLs for NNTP newsgroup(s).