From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 6B34D5587 for ; Mon, 22 Feb 2016 19:19:03 +0100 (CET) Received: by mail-wm0-f48.google.com with SMTP id a4so175417481wme.1 for ; Mon, 22 Feb 2016 10:19:03 -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=+YMW5p42xOOnd3OnC3CxxM63PMOyN/ZvsnC/3GwCxls=; b=N09b/p9/dREVO1++EG/Gw9x7RPeduRO5oUUAXu8WzAaJcvmmK4gAJfA6ezZXBE4LpY tdoSaJx2hTBeb994rw65cVmOU1H3MjpXAf8DARLT92NIMwjT1aRuD5YVdwjt/iu2hxkG U5GYYzt02o96QNKv23RTU6hKGPkWmsb/7ZbOjhmXI3nDiTrIo0paIOF1pbIwSuKImuy9 WYZY+xfhCwHm/yL595gRCDaHHt5rip/dPWlqkbcjZPQnq5VTftJ8r+gMScGyRglUq91c bf1wGMp6pBDCvUvxFOX8HMA1wRg0iO/3CAJiMoT4tYhjAI0SRqBdx5dJ6Vn0f2egsiMI mZMA== 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=+YMW5p42xOOnd3OnC3CxxM63PMOyN/ZvsnC/3GwCxls=; b=aqYOKV1OIOzDFkFW4LIKAes4TuPoDe8ij0OpzG78S5DpJe/6TYqLW4Pt0cw6ngl0wd nZQegYKlH5oJAcEEex9KtvKhqLSjHoMYgAcvD5LyNvsA4RrOFQZyVU5s5NsylPpAsSgh 8wBraBrpRa7Qc7s17vbL2UXsq9pJ/XCRPU+YzQvW90oa0GfTALdT2t4Nhwp1VCN4dykV bH+odbGLIwPpULVYot1kGvIKETJu5WN5fBKpOrvyzWtYdcXCQW/9Spub2iGwsaPUSXWw R67yN0epzSoiDM8fp8aGuuc79HolW5wmJx7wRcLkloW9gSlQwIBwmz6iSkBqIbyQ+2Az qtdA== X-Gm-Message-State: AG10YOSnIQZPO0t7vUHSKy5fMQ7YcBkUjdn+zjuGq9mNdd5S71UDu8MTAe2l3fZrpkpoj/8Z X-Received: by 10.28.88.15 with SMTP id m15mr13403696wmb.60.1456165143332; Mon, 22 Feb 2016 10:19:03 -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 t12sm22170397wmt.20.2016.02.22.10.19.02 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 22 Feb 2016 10:19:02 -0800 (PST) From: Adrien Mazarguil To: dev@dpdk.org Date: Mon, 22 Feb 2016 19:18:37 +0100 Message-Id: <1456165123-28365-2-git-send-email-adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456165123-28365-1-git-send-email-adrien.mazarguil@6wind.com> References: <1456165123-28365-1-git-send-email-adrien.mazarguil@6wind.com> Subject: [dpdk-dev] [PATCH 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: Mon, 22 Feb 2016 18:19:03 -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 4d2f76c..09afff9 100644 --- a/doc/guides/rel_notes/release_16_04.rst +++ b/doc/guides/rel_notes/release_16_04.rst @@ -142,6 +142,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