Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f80ff8e authored by Sagi Grimberg's avatar Sagi Grimberg Committed by Nicholas Bellinger
Browse files

Target/iser: Gracefully reject T10-PI enabled connect request if not supported



In case user chose to set T10-PI enable on the target while
the IB device does not support it, gracefully reject the request.

Reported-by: default avatarSlava Shwartsman <valyushash@gmail.com>
Signed-off-by: default avatarSagi Grimberg <sagig@mellanox.com>
Cc: stable@vger.kernel.org # 3.15+
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent f5ebec96
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -663,8 +663,9 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event)

	pi_support = np->tpg_np->tpg->tpg_attrib.t10_pi;
	if (pi_support && !device->pi_capable) {
		pr_err("Protection information requested but not supported\n");
		ret = -EINVAL;
		pr_err("Protection information requested but not supported, "
		       "rejecting connect request\n");
		ret = rdma_reject(cma_id, NULL, 0);
		goto out_mr;
	}