DPDK patches and discussions
 help / color / mirror / Atom feed
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 1/7] mlx5: fix possible crash during initialization
Date: Thu,  3 Mar 2016 15:27:34 +0100	[thread overview]
Message-ID: <1457015260-3041-2-git-send-email-adrien.mazarguil@6wind.com> (raw)
In-Reply-To: <1457015260-3041-1-git-send-email-adrien.mazarguil@6wind.com>

From: Or Ami <ora@mellanox.com>

RSS configuration should not be freed when priv is NULL.

Fixes: 2f97422e7759 ("mlx5: support RSS hash update and get")

Signed-off-by: Or Ami <ora@mellanox.com>
---
 doc/guides/rel_notes/release_16_04.rst | 4 ++++
 drivers/net/mlx5/mlx5.c                | 6 ++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/doc/guides/rel_notes/release_16_04.rst b/doc/guides/rel_notes/release_16_04.rst
index c69e55e..953eaa1 100644
--- a/doc/guides/rel_notes/release_16_04.rst
+++ b/doc/guides/rel_notes/release_16_04.rst
@@ -150,6 +150,10 @@ Drivers
 
 * **vmxnet3: add TSO support.**
 
+* **mlx5: Fixed possible crash during initialization.**
+
+  A crash could occur when failing to allocate private device context.
+
 
 Libraries
 ~~~~~~~~~
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 575420e..41dcbbf 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -497,8 +497,10 @@ mlx5_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 		continue;
 
 port_error:
-		rte_free(priv->rss_conf);
-		rte_free(priv);
+		if (priv) {
+			rte_free(priv->rss_conf);
+			rte_free(priv);
+		}
 		if (pd)
 			claim_zero(ibv_dealloc_pd(pd));
 		if (ctx)
-- 
2.1.4

  reply	other threads:[~2016-03-03 14:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 18:18 [dpdk-dev] [PATCH 0/7] Assorted fixes for mlx4 and mlx5 Adrien Mazarguil
2016-02-22 18:18 ` [dpdk-dev] [PATCH 1/7] mlx5: fix possible crash during initialization Adrien Mazarguil
2016-02-22 18:18 ` [dpdk-dev] [PATCH 2/7] mlx5: check if port is configured as Ethernet device Adrien Mazarguil
2016-02-22 18:18 ` [dpdk-dev] [PATCH 3/7] mlx5: manage all special flow types at once Adrien Mazarguil
2016-02-22 18:18 ` [dpdk-dev] [PATCH 4/7] mlx5: remove redundant debugging message Adrien Mazarguil
2016-02-22 18:18 ` [dpdk-dev] [PATCH 5/7] mlx5: apply VLAN filtering to broadcast and IPv6 multicast flows Adrien Mazarguil
2016-02-22 18:18 ` [dpdk-dev] [PATCH 6/7] mlx5: fix RX checksum offload in non L3/L4 packets Adrien Mazarguil
2016-02-22 18:18 ` [dpdk-dev] [PATCH 7/7] mlx4: make sure that number of RX queues is a power of 2 Adrien Mazarguil
2016-03-03 14:27 ` [dpdk-dev] [PATCH v2 0/7] Assorted fixes for mlx4 and mlx5 Adrien Mazarguil
2016-03-03 14:27   ` Adrien Mazarguil [this message]
2016-03-03 14:27   ` [dpdk-dev] [PATCH v2 2/7] mlx5: check if port is configured as Ethernet device Adrien Mazarguil
2016-03-03 14:27   ` [dpdk-dev] [PATCH v2 3/7] mlx5: manage all special flow types at once Adrien Mazarguil
2016-03-03 14:27   ` [dpdk-dev] [PATCH v2 4/7] mlx5: remove redundant debugging message Adrien Mazarguil
2016-03-03 14:27   ` [dpdk-dev] [PATCH v2 5/7] mlx5: apply VLAN filtering to broadcast and IPv6 multicast flows Adrien Mazarguil
2016-03-03 14:27   ` [dpdk-dev] [PATCH v2 6/7] mlx5: fix RX checksum offload in non L3/L4 packets Adrien Mazarguil
2016-03-03 14:27   ` [dpdk-dev] [PATCH v2 7/7] mlx4: make sure that number of RX queues is a power of 2 Adrien Mazarguil
2016-03-10 22:15   ` [dpdk-dev] [PATCH v2 0/7] Assorted fixes for mlx4 and mlx5 Bruce Richardson

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=1457015260-3041-2-git-send-email-adrien.mazarguil@6wind.com \
    --to=adrien.mazarguil@6wind.com \
    --cc=dev@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).