[dpdk-stable] patch 'net/i40e: fix allocation check' has been queued to stable release 17.02.1

Yuanhan Liu yuanhan.liu at linux.intel.com
Thu May 25 11:48:47 CEST 2017


Hi,

FYI, your patch has been queued to stable release 17.02.1

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

Thanks.

	--yliu

---
>From 68f285f551116f48914f9cd409cd0a88837b2b87 Mon Sep 17 00:00:00 2001
From: Henry Cai <caihe at huawei.com>
Date: Wed, 5 Apr 2017 21:19:53 +0800
Subject: [PATCH] net/i40e: fix allocation check

[ upstream commit 1cbeaa0eadbbc228a78e930ffdaa603eff4ff2ec ]

function i40evf_add_del_all_mac_addr without check return
value of rte_zmalloc

Fixes: 97ac72aa71a9 ("i40e: support setting VF MAC address")

Signed-off-by: Henry Cai <caihe at huawei.com>
Acked-by: Helin Zhang <helin.zhang at intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 55fd344..1a9e502 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2014,6 +2014,10 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add)
 		}
 
 		list = rte_zmalloc("i40evf_del_mac_buffer", len, 0);
+		if (!list) {
+			PMD_DRV_LOG(ERR, "fail to allocate memory");
+			return;
+		}
 
 		for (i = begin; i < next_begin; i++) {
 			addr = &dev->data->mac_addrs[i];
-- 
1.9.0



More information about the stable mailing list