From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Sagi Grimberg <sagig@mellanox.com>,
Nicholas Bellinger <nab@linux-iscsi.org>
Subject: [PATCH 3.14 04/19] Target/iscsi,iser: Avoid accepting transport connections during stop stage
Date: Thu, 12 Jun 2014 16:21:41 -0700 [thread overview]
Message-ID: <20140612232138.846818026@linuxfoundation.org> (raw)
In-Reply-To: <20140612232138.561318739@linuxfoundation.org>
3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sagi Grimberg <sagig@mellanox.com>
commit 14f4b54fe38f3a8f8392a50b951c8aa43b63687a upstream.
When the target is in stop stage, iSER transport initiates RDMA disconnects.
The iSER initiator may wish to establish a new connection over the
still existing network portal. In this case iSER transport should not
accept and resume new RDMA connections. In order to learn that, iscsi_np
is added with enabled flag so the iSER transport can check when deciding
weather to accept and resume a new connection request.
The iscsi_np is enabled after successful transport setup, and disabled
before iscsi_np login threads are cleaned up.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/infiniband/ulp/isert/ib_isert.c | 8 ++++++++
drivers/target/iscsi/iscsi_target_core.h | 1 +
drivers/target/iscsi/iscsi_target_login.c | 1 +
drivers/target/iscsi/iscsi_target_tpg.c | 1 +
4 files changed, 11 insertions(+)
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -489,6 +489,14 @@ isert_connect_request(struct rdma_cm_id
struct ib_device *ib_dev = cma_id->device;
int ret = 0;
+ spin_lock_bh(&np->np_thread_lock);
+ if (!np->enabled) {
+ spin_unlock_bh(&np->np_thread_lock);
+ pr_debug("iscsi_np is not enabled, reject connect request\n");
+ return rdma_reject(cma_id, NULL, 0);
+ }
+ spin_unlock_bh(&np->np_thread_lock);
+
pr_debug("Entering isert_connect_request cma_id: %p, context: %p\n",
cma_id, cma_id->context);
--- a/drivers/target/iscsi/iscsi_target_core.h
+++ b/drivers/target/iscsi/iscsi_target_core.h
@@ -773,6 +773,7 @@ struct iscsi_np {
int np_ip_proto;
int np_sock_type;
enum np_thread_state_table np_thread_state;
+ bool enabled;
enum iscsi_timer_flags_table np_login_timer_flags;
u32 np_exports;
enum np_flags_table np_flags;
--- a/drivers/target/iscsi/iscsi_target_login.c
+++ b/drivers/target/iscsi/iscsi_target_login.c
@@ -981,6 +981,7 @@ int iscsi_target_setup_login_socket(
}
np->np_transport = t;
+ np->enabled = true;
return 0;
}
--- a/drivers/target/iscsi/iscsi_target_tpg.c
+++ b/drivers/target/iscsi/iscsi_target_tpg.c
@@ -184,6 +184,7 @@ static void iscsit_clear_tpg_np_login_th
return;
}
+ tpg_np->tpg_np->enabled = false;
iscsit_reset_np_thread(tpg_np->tpg_np, tpg_np, tpg, shutdown);
}
next prev parent reply other threads:[~2014-06-12 23:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-12 23:21 [PATCH 3.14 00/19] 3.14.8-stable review Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 01/19] fs,userns: Change inode_capable to capable_wrt_inode_uidgid Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 02/19] netfilter: ipv4: defrag: set local_df flag on defragmented skb Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 03/19] MIPS: asm: thread_info: Add _TIF_SECCOMP flag Greg Kroah-Hartman
2014-06-12 23:21 ` Greg Kroah-Hartman [this message]
2014-06-12 23:21 ` [PATCH 3.14 05/19] iser-target: Fix multi network portal shutdown regression Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 06/19] target: Allow READ_CAPACITY opcode in ALUA Standby access state Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 07/19] auditsc: audit_krule mask accesses need bounds checking Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 08/19] PCI/MSI: Fix memory leak in free_msi_irqs() Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 09/19] mei: me: fix hw ready reset flow Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 10/19] mei: me: drop harmful wait optimization Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 11/19] mei: me: read H_CSR after asserting reset Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 13/19] [media] rtl28xxu: add USB ID for Genius TVGo DVB-T03 Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 14/19] [media] rtl28xxu: add chipset version comments into device list Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 15/19] [media] rtl28xxu: add 1b80:d395 Peak DVB-T USB Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 16/19] [media] rtl28xxu: add [1b80:d39d] Sveon STV20 Greg Kroah-Hartman
2014-06-12 23:21 ` [PATCH 3.14 17/19] [media] rtl28xxu: add [1b80:d3af] Sveon STV27 Greg Kroah-Hartman
2014-06-13 5:47 ` [PATCH 3.14 00/19] 3.14.8-stable review Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140612232138.846818026@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=sagig@mellanox.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).