From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id AC32A2C25 for ; Thu, 3 Mar 2016 15:27:56 +0100 (CET) Received: by mail-wm0-f46.google.com with SMTP id p65so37299492wmp.1 for ; Thu, 03 Mar 2016 06:27:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=i7wUhpksn1tZqwVV6PXQqR9Nomd1YiEMT5ev6jRUlis=; b=fKkxd7ztLv3Q7Oxzy3SfnaIIxWpBLDSg895alR6e878F/80tPIteCmAr7bl72X2iSv q+lwTMnMaiSHVILf+8DFLXr7Qls8wIv9xgUohCjoBmc2/sIpKB/4HAsq21ggXz7nWNEh 3FbYMzHEGJ//r5uSTLWTadDXA58SNhqAgPE6vrBBKdp0kTGSw4q3y9HkfJfiHUsQyE2+ rhBbewD8/zrV9d8gss7h92/aY2b2R/+B/7qhjF3Gxz0rHFyw+0heEQRP5/iVPMgZCx4q Mtxj4F4VqJTc+1zS9GVqspPXcUq+X4I9ZpyHpIWWBk03OY84yds9vF3VUIOkdZTmhw2Y UeTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=i7wUhpksn1tZqwVV6PXQqR9Nomd1YiEMT5ev6jRUlis=; b=m8byzVuwSY+HF8tOic/GhHOvwf5NhaPNKIJTKxUwiw0vc5znAvkqVUiEQjVBnmHbbb srOpZP1Te2i/5Lcr545Wx/oE2Kpr76OJn87f4AHAdc5YvQZuMwqA4GedI1dMjnqmOrZn jUgOSm+ezmEpmPpiw08qT9wyruFZDzp6cYDCusLpwYsUACsGY5AhT9/O1cBbeRJSl1GP RP8rzTp+YobSppkJbSMZcbSTmaBgg6FNAXJ7scU0whBBi3oNJbeXoCMZSqOMaqoey2SW /dVJkPGD7AMCFusq7nJxw2+OWahI+4JInFE0VQD/tJFDq1/w5vDvEfyDlc5ki3CYrGeY zOgw== X-Gm-Message-State: AD7BkJK3Z6O1bUglmznAavLKRhj4z4OYHqgqifcScAnEGXE6QDQEXwM/xEjoj+XNT+4whIGe X-Received: by 10.194.60.200 with SMTP id j8mr3274639wjr.124.1457015276545; Thu, 03 Mar 2016 06:27:56 -0800 (PST) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id lz5sm40793939wjb.5.2016.03.03.06.27.55 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Mar 2016 06:27:55 -0800 (PST) From: Adrien Mazarguil To: dev@dpdk.org Date: Thu, 3 Mar 2016 15:27:34 +0100 Message-Id: <1457015260-3041-2-git-send-email-adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1457015260-3041-1-git-send-email-adrien.mazarguil@6wind.com> References: <1456165123-28365-1-git-send-email-adrien.mazarguil@6wind.com> <1457015260-3041-1-git-send-email-adrien.mazarguil@6wind.com> Subject: [dpdk-dev] [PATCH v2 1/7] mlx5: fix possible crash during initialization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2016 14:27:56 -0000 From: Or Ami RSS configuration should not be freed when priv is NULL. Fixes: 2f97422e7759 ("mlx5: support RSS hash update and get") Signed-off-by: Or Ami --- 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