Skip to contentSkip to conversation

Patch "iscsi-target: Return error if unable to add network portal" has been added to the 4.8-stable tree

PATCH [email protected] 1 participant 1 message Jan 6, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

iscsi-target: Return error if unable to add network portal

to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
iscsi-target-return-error-if-unable-to-add-network-portal.patch
and it can be found in the queue-4.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 83337e544323a8bd7492994d64af339175ac7107 Mon Sep 17 00:00:00 2001

From: Varun Prakash <[email protected]>
Date: Sun, 11 Dec 2016 22:05:56 +0530
Subject: iscsi-target: Return error if unable to add network portal

From: Varun Prakash <[email protected]>

commit 83337e544323a8bd7492994d64af339175ac7107 upstream.

If iscsit_tpg_add_network_portal() fails then
return error code instead of 0 to user space.

If iscsi-target returns 0 then user space keeps
on retrying same command infinitely, targetcli or
echo hangs till command completes with non zero
return value. In some cases it is possible that
add network portal command never completes with
success even after retrying multiple times,
for example - cxgbit_setup_np() always returns
-EINVAL if portal IP does not belong to Chelsio
adapter interface.

[ bvanassche: Added "Fixes:" and "Cc: stable" tags ]
Fixes commit d4b3fa4b0881 ("iscsi-target: Make iscsi_tpg_np driver show/store use generic code")
---
 drivers/target/iscsi/iscsi_target_configfs.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/target/iscsi/iscsi_target_configfs.c +3 -1
@@ -100,8 +100,10 @@ static ssize_t lio_target_np_driver_stor
 
 		tpg_np_new = iscsit_tpg_add_network_portal(tpg,
 					&np->np_sockaddr, tpg_np, type);
-		if (IS_ERR(tpg_np_new))
+		if (IS_ERR(tpg_np_new)) {
+			rc = PTR_ERR(tpg_np_new);
 			goto out;
+		}
 	} else {
 		tpg_np_new = iscsit_tpg_locate_child_np(tpg_np, type);
 		if (tpg_np_new) {

Patches currently in stable-queue which might be from [email protected] are

queue-4.8/iscsi-target-return-error-if-unable-to-add-network-portal.patch