aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2014-06-10 06:41:41 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2014-06-11 14:52:39 -0400
commite0546fc1ba66c90cb38a5764357366267d3e58e4 (patch)
tree2b472ce77b4b24eed42cae22f8a5abcd5d3d22fb /drivers/infiniband
parentbbc050488525e1ab1194c27355f63c66814385b8 (diff)
Target/iser: Fix a wrong dereference in case discovery session is over iser
In case the discovery session is carried over iser, we can't access the assumed network portal since the default portal is used. In this case we don't really need to allocate the fastreg pool, just prepare to the text pdu that will follow. Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Reported-by: Alex Tabachnik <alext@mellanox.com> Cc: stable@vger.kernel.org # 3.15+ Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/isert/ib_isert.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index b622783ab198..647a5e2beee4 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -1053,7 +1053,9 @@ isert_put_login_tx(struct iscsi_conn *conn, struct iscsi_login *login,
1053 } 1053 }
1054 if (!login->login_failed) { 1054 if (!login->login_failed) {
1055 if (login->login_complete) { 1055 if (login->login_complete) {
1056 if (isert_conn->conn_device->use_fastreg) { 1056 if (!conn->sess->sess_ops->SessionType &&
1057 isert_conn->conn_device->use_fastreg) {
1058 /* Normal Session and fastreg is used */
1057 u8 pi_support = login->np->tpg_np->tpg->tpg_attrib.t10_pi; 1059 u8 pi_support = login->np->tpg_np->tpg->tpg_attrib.t10_pi;
1058 1060
1059 ret = isert_conn_create_fastreg_pool(isert_conn, 1061 ret = isert_conn_create_fastreg_pool(isert_conn,