patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Yongseok Koh <yskoh@mellanox.com>
To: Dan Gora <dg@adax.com>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'kni: fix crash with null name' has been queued to LTS release 17.11.4
Date: Mon, 13 Aug 2018 13:42:56 -0700	[thread overview]
Message-ID: <20180813204300.25514-3-yskoh@mellanox.com> (raw)
In-Reply-To: <20180813204300.25514-1-yskoh@mellanox.com>

Hi,

FYI, your patch has been queued to LTS release 17.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/15/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From 33fe4b59aae2a7e889d41134793323989ba13773 Mon Sep 17 00:00:00 2001
From: Dan Gora <dg@adax.com>
Date: Thu, 28 Jun 2018 15:58:38 -0700
Subject: [PATCH] kni: fix crash with null name

[ upstream commit e716b639856cc4baa46bc6d5bc63bcc1d6bd9cf9 ]

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")

Signed-off-by: Dan Gora <dg@adax.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.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 8eca8c03b..4b45d1a01 100644
--- a/lib/librte_kni/rte_kni.c
+++ b/lib/librte_kni/rte_kni.c
@@ -681,6 +681,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];
-- 
2.11.0

  parent reply	other threads:[~2018-08-13 20:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-13 20:42 [dpdk-stable] patch 'hash: fix doxygen of return values' " Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'net/qede: fix ntuple filter configuration' " Yongseok Koh
2018-08-13 20:42 ` Yongseok Koh [this message]
2018-08-13 20:42 ` [dpdk-stable] patch 'kni: fix build on RHEL 7.5' " Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'net/mlx5: preserve promiscuous flag for flow isolation mode' " Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'net/mlx5: preserve allmulticast " Yongseok Koh
2018-08-13 20:43 ` [dpdk-stable] patch 'ethdev: fix a doxygen comment for port allocation' " Yongseok Koh

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=20180813204300.25514-3-yskoh@mellanox.com \
    --to=yskoh@mellanox.com \
    --cc=dg@adax.com \
    --cc=ferruh.yigit@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).