DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Gaetan Rivet <grive@u256.net>
Cc: dev <dev@dpdk.org>,
	madhuker.mythri@oracle.com,  "Yigit,
	Ferruh" <ferruh.yigit@intel.com>
Subject: Re: [PATCH] devargs: Fix rte_devargs_parse uninitialized calls
Date: Tue, 15 Feb 2022 16:27:13 +0100	[thread overview]
Message-ID: <CAJFAV8wncjPReH1etvkpQst8J6U1iaZs0dkbfA0r_ZvpYMZvhw@mail.gmail.com> (raw)
In-Reply-To: <20220210170131.2199922-1-grive@u256.net>

On Thu, Feb 10, 2022 at 6:01 PM Gaetan Rivet <grive@u256.net> wrote:
>
> The function rte_devargs_parse() previously was safe to call with
> non-initialized devargs structure as parameter.
>
> When adding the support for the global device syntax,
> this assumption was broken. Restore it by forcing memset as part of
> the call itself.
>
> Bugzilla Id: 933

Nit: Bugzilla ID*

> Fixes: b344eb5d941a ("devargs: parse global device syntax")

We need a backport in 21.11, right?


> Signed-off-by: Gaetan Rivet <grive@u256.net>
> ---
>  lib/eal/common/eal_common_devargs.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/eal/common/eal_common_devargs.c b/lib/eal/common/eal_common_devargs.c
> index 8c7650cf6c..184fe676aa 100644
> --- a/lib/eal/common/eal_common_devargs.c
> +++ b/lib/eal/common/eal_common_devargs.c
> @@ -191,6 +191,7 @@ rte_devargs_parse(struct rte_devargs *da, const char *dev)
>
>         if (da == NULL)
>                 return -EINVAL;
> +       memset(da, 0, sizeof(*da));
>
>         /* First parse according global device syntax. */
>         if (rte_devargs_layers_parse(da, dev) == 0) {
> --
> 2.31.1
>

Otherwise lgtm.


-- 
David Marchand


  parent reply	other threads:[~2022-02-15 15:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10  7:10 [PATCH] net/failsafe: Fix crash due to global devargs syntax parsing from secondary process madhuker.mythri
2022-02-10 15:00 ` Ferruh Yigit
2022-02-10 16:08   ` Gaëtan Rivet
2022-02-11  9:37     ` [External] : Re: Madhuker Mythri
2022-02-11  9:58       ` [External] : Re: [PATCH] net/failsafe: Fix crash due to global devargs syntax parsing from secondary process Ferruh Yigit
2022-02-11  9:58       ` [External] : Gaëtan Rivet
2022-02-16  8:27         ` Long Li
2022-02-10 17:01 ` [PATCH] devargs: Fix rte_devargs_parse uninitialized calls Gaetan Rivet
2022-02-15 12:51   ` Ferruh Yigit
2022-02-15 13:45     ` Gaëtan Rivet
2022-02-15 15:27   ` David Marchand [this message]
2022-02-16 17:12     ` 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=CAJFAV8wncjPReH1etvkpQst8J6U1iaZs0dkbfA0r_ZvpYMZvhw@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=grive@u256.net \
    --cc=madhuker.mythri@oracle.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).