Re: [PATCH] Target/iser: Gracefully reject T10-PI enabled connect request if not supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2014-05-20 at 13:28 +0300, Sagi Grimberg wrote:
> 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: Slava Shwartsman <valyushash@xxxxxxxxx>
> Signed-off-by: Sagi Grimberg <sagig@xxxxxxxxxxxx>
> ---
>  drivers/infiniband/ulp/isert/ib_isert.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
> index 9e91235..27205fb 100644
> --- a/drivers/infiniband/ulp/isert/ib_isert.c
> +++ b/drivers/infiniband/ulp/isert/ib_isert.c
> @@ -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;
>  	}
>  

Applied to for-next with CC' to v3.15.y.

Thanks Sagi!

--nab

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux