DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Qi Zhang <qi.z.zhang@intel.com>
Cc: dev@dpdk.org, gaetan.rivet@6wind.com
Subject: Re: [dpdk-dev] [PATCH] eal: fix floating device argument pointer
Date: Mon, 22 Oct 2018 09:25:22 +0200	[thread overview]
Message-ID: <1576298.HKmtsfqzoT@xps> (raw)
In-Reply-To: <20181022054932.39052-1-qi.z.zhang@intel.com>

22/10/2018 07:49, Qi Zhang:
> After we insert a devargs into devargs_list, following bus->scan may
> destroy it due to another rte_devargs_insert. Its better not to use
> a devargs pointer after it has been inserted.

I think the problem is in:

rte_devargs_insert(struct rte_devargs *da)
{
    int ret;

    ret = rte_devargs_remove(da);                                                                    
    if (ret < 0)
        return ret;
    TAILQ_INSERT_TAIL(&devargs_list, da, next);
    return 0;
}

We insert a structure which is freed!

See http://git.dpdk.org/dpdk/commit/?id=55744d83d525

Gaetan, what can be the fix?

  reply	other threads:[~2018-10-22  7:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-22  5:49 Qi Zhang
2018-10-22  7:25 ` Thomas Monjalon [this message]
2018-10-23 22:39   ` Gaëtan Rivet
2018-10-24 14:43     ` Thomas Monjalon
2018-10-24 15:33       ` Gaëtan Rivet
2018-10-25  3:22         ` Zhang, Qi Z
2018-10-25  9:42           ` Gaëtan Rivet

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=1576298.HKmtsfqzoT@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=gaetan.rivet@6wind.com \
    --cc=qi.z.zhang@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).