DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Olivier Matz <olivier.matz@6wind.com>
Cc: dev <dev@dpdk.org>,
	Lavanya Govindarajan <lavanyax.govindarajan@intel.com>,
	Reshma Pattan <reshma.pattan@intel.com>,
	dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] test/mbuf: fix access to freed memory
Date: Wed, 3 Nov 2021 16:00:26 +0100	[thread overview]
Message-ID: <CAJFAV8xYgqmqpCDg+PA0+ad+sKtepZ_A7u221omSaBo8tiRnhA@mail.gmail.com> (raw)
In-Reply-To: <20211029121544.13298-1-olivier.matz@6wind.com>

On Fri, Oct 29, 2021 at 2:16 PM Olivier Matz <olivier.matz@6wind.com> wrote:
>
> Seen by ASan.
>
> In the external buffer mbuf test, we check that the buffer is freed
> by checking that its refcount is 0. This is not a valid condition,
> because it accesses to an already freed area.
>
> Fix this by setting a boolean flag in the callback when rte_free()
> is actually called, and check this flag instead.
>
> Bugzilla ID: 867
> Fixes: 7b295dceea07 ("test/mbuf: add unit test cases")
> Cc: stable@dpdk.org
>
> Reported-by: David Marchand <david.marchand@redhat.com>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


  reply	other threads:[~2021-11-03 15:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 12:15 Olivier Matz
2021-11-03 15:00 ` David Marchand [this message]
2021-11-04 10:09   ` David Marchand

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=CAJFAV8xYgqmqpCDg+PA0+ad+sKtepZ_A7u221omSaBo8tiRnhA@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=lavanyax.govindarajan@intel.com \
    --cc=olivier.matz@6wind.com \
    --cc=reshma.pattan@intel.com \
    --cc=stable@dpdk.org \
    /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).