From: Thomas Monjalon <thomas@monjalon.net>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Dan Gora <dg@adax.com>, marc.sune@bisdn.de
Subject: Re: [PATCH 1/1] kni: fix segfault in rte_kni_get
Date: Wed, 01 Aug 2018 18:44:58 +0200 [thread overview]
Message-ID: <2698225.a6zRWv2j3G@xps> (raw)
In-Reply-To: <20180628225838.22732-1-dg@adax.com>
This patch is missing review.
29/06/2018 00:58, Dan Gora:
> Fix a segmentation fault which occurs when the kni_autotest is run
> in the 'test' application.
>
> This segmenation fault occurs when rte_kni_get() is called with a
> NULL value for 'name'.
>
> Fixes: 0c6bc8ef70ba ("kni: memzone pool for alloc and release")
> Cc: marc.sune@bisdn.de
>
> Signed-off-by: Dan Gora <dg@adax.com>
> ---
> lib/librte_kni/rte_kni.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
> index aa3559306..c4199e6ab 100644
> --- a/lib/librte_kni/rte_kni.c
> +++ b/lib/librte_kni/rte_kni.c
> @@ -744,6 +744,9 @@ rte_kni_get(const char *name)
> struct rte_kni_memzone_slot *it;
> struct rte_kni *kni;
>
> + if (name == NULL || name[0] == '\0')
> + return NULL;
> +
> /* Note: could be improved perf-wise if necessary */
> for (i = 0; i < kni_memzone_pool.max_ifaces; i++) {
> it = &kni_memzone_pool.slots[i];
>
next prev parent reply other threads:[~2018-08-01 16:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-28 22:58 [PATCH 1/1] kni: fix segfault in rte_kni_get Dan Gora
2018-08-01 16:44 ` Thomas Monjalon [this message]
2018-08-09 9:44 ` Ferruh Yigit
2018-08-09 9:52 ` 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=2698225.a6zRWv2j3G@xps \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=dg@adax.com \
--cc=ferruh.yigit@intel.com \
--cc=marc.sune@bisdn.de \
/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.