From: Thomas Monjalon <thomas@monjalon.net>
To: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Cc: dev@dpdk.org, gaetan.rivet@6wind.com
Subject: Re: [PATCH] dev: don't remove devargs that are still referenced
Date: Wed, 21 Nov 2018 19:55:00 +0100 [thread overview]
Message-ID: <2837515.psv4tKiTEp@xps> (raw)
In-Reply-To: <20181121183750.33796-1-dariusz.stojaczyk@intel.com>
21/11/2018 19:37, Darek Stojaczyk:
> Even if a device failed to plug, it's still a device
> object that references the devargs. Those devargs will
> be freed automatically together with the device, but
> can't be freed any earlier.
Thanks for the patch.
Please, be more specific about the bug.
You could add 2 more paragraphs:
- One before, to explain the tested scenario and the result.
- One after, to explain how it is fixed (changing the goto by a return).
[...]
> ret = dev->bus->plug(dev);
> if (ret) {
> - if (rte_dev_is_probed(dev)) /* if already succeeded earlier */
> - return ret; /* no rollback */
> - RTE_LOG(ERR, EAL, "Driver cannot attach the device (%s)\n",
> - dev->name);
> - goto err_devarg;
> + if (!rte_dev_is_probed(dev)) /* if hasn't succeeded earlier */
> + RTE_LOG(ERR, EAL, "Driver cannot attach the device (%s)\n",
> + dev->name);
> + return ret;
> }
next prev parent reply other threads:[~2018-11-21 18:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 18:37 [PATCH] dev: don't remove devargs that are still referenced Darek Stojaczyk
2018-11-21 18:55 ` Thomas Monjalon [this message]
2018-11-21 19:38 ` [PATCH v2] " Darek Stojaczyk
2018-11-22 9:54 ` Gaëtan Rivet
2018-11-22 12:54 ` Stojaczyk, Dariusz
2018-11-23 15:43 ` [PATCH v3] " Darek Stojaczyk
2018-11-23 17:04 ` Maxime Coquelin
2018-11-23 21:45 ` Stojaczyk, Dariusz
2018-11-25 12:46 ` 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=2837515.psv4tKiTEp@xps \
--to=thomas@monjalon.net \
--cc=dariusz.stojaczyk@intel.com \
--cc=dev@dpdk.org \
--cc=gaetan.rivet@6wind.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.