Blame SOURCES/0001-net-enic-fix-crash-on-MTU-update-with-non-setup-queu.patch

a6040a
From 33a2d6594945eb3278bfa441f79ae9a38ea538a0 Mon Sep 17 00:00:00 2001
a6040a
From: John Daley <johndale@cisco.com>
a6040a
Date: Wed, 4 Apr 2018 16:54:53 -0700
a6040a
Subject: [PATCH] net/enic: fix crash on MTU update with non-setup queues
a6040a
a6040a
The enic code called from rte_eth_dev_set_mtu() was assuming that the
a6040a
Rx queues are already set up via a call to rte_eth_tx_queue_setup().
a6040a
OVS calls rte_eth_dev_set_mtu() before rte_eth_rx_queue_setup() and
a6040a
a null pointer was dereferenced.
a6040a
a6040a
Fixes: c3e09182bcd6 ("net/enic: support scatter Rx in MTU update")
a6040a
Cc: stable@dpdk.org
a6040a
a6040a
Signed-off-by: John Daley <johndale@cisco.com>
a6040a
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
a6040a
---
a6040a
 drivers/net/enic/enic_main.c | 2 ++
a6040a
 1 file changed, 2 insertions(+)
a6040a
a6040a
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
a6040a
index d15d236f7..98d47752c 100644
a6040a
--- a/drivers/net/enic/enic_main.c
a6040a
+++ b/drivers/net/enic/enic_main.c
a6040a
@@ -1440,6 +1440,8 @@ int enic_set_mtu(struct enic *enic, uint16_t new_mtu)
a6040a
 	/* free and reallocate RQs with the new MTU */
a6040a
 	for (rq_idx = 0; rq_idx < enic->rq_count; rq_idx++) {
a6040a
 		rq = &enic->rq[enic_rte_rq_idx_to_sop_idx(rq_idx)];
a6040a
+		if (!rq->in_use)
a6040a
+			continue;
a6040a
 
a6040a
 		enic_free_rq(rq);
a6040a
 		rc = enic_alloc_rq(enic, rq_idx, rq->socket_id, rq->mp,
a6040a
-- 
a6040a
2.14.3
a6040a