Blame SOURCES/open-iscsi-2.0.876-56-iscsiuio-Release-xmit_mutex-in-error-code-path.patch

47585c
From cda251fc8bcf57454a2573d5cd097666a88efe72 Mon Sep 17 00:00:00 2001
47585c
From: Manish Rangankar <manish.rangankar@cavium.com>
47585c
Date: Tue, 14 Aug 2018 02:15:20 -0400
47585c
Subject: [PATCH] iscsiuio: Release xmit_mutex in error code path.
47585c
47585c
This prevents iscsiuio seg fault in case get_tx_pkt fails
47585c
while sending ARP.
47585c
47585c
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
47585c
---
47585c
 iscsiuio/src/unix/libs/cnic.c | 1 +
47585c
 1 file changed, 1 insertion(+)
47585c
47585c
diff --git a/iscsiuio/src/unix/libs/cnic.c b/iscsiuio/src/unix/libs/cnic.c
47585c
index 4ff61e7ad596..9cdf933f1f23 100644
47585c
--- a/iscsiuio/src/unix/libs/cnic.c
47585c
+++ b/iscsiuio/src/unix/libs/cnic.c
47585c
@@ -114,6 +114,7 @@ static int cnic_arp_send(nic_t *nic, nic_interface_t *nic_iface, int fd,
47585c
 	eth = (*nic->ops->get_tx_pkt) (nic);
47585c
 	if (eth == NULL) {
47585c
 		LOG_WARN(PFX "%s: couldn't get tx packet", nic->log_name);
47585c
+		pthread_mutex_unlock(&nic->xmit_mutex);
47585c
 		return -EAGAIN;
47585c
 	}
47585c
 
47585c
-- 
47585c
2.17.2
47585c