* [PATCH] iser: set sector for ambiguous mr status errors
@ 2018-11-14 18:17 Sagi Grimberg
2018-11-21 23:02 ` Jason Gunthorpe
0 siblings, 1 reply; 2+ messages in thread
From: Sagi Grimberg @ 2018-11-14 18:17 UTC (permalink / raw)
To: linux-rdma, linux-scsi; +Cc: Dan Carpenter, stable
If for some reason we failed to query the mr status, we need to make sure
to provide sufficient information for an ambiguous error (guard error on
sector 0).
Fixes: 0a7a08ad6f5f ("IB/iser: Implement check_protection")
Cc: <stable@vger.kernel.org>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
---
drivers/infiniband/ulp/iser/iser_verbs.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
index 946b623ba5eb..ab137bafa8a8 100644
--- a/drivers/infiniband/ulp/iser/iser_verbs.c
+++ b/drivers/infiniband/ulp/iser/iser_verbs.c
@@ -1124,7 +1124,9 @@ u8 iser_check_task_pi_status(struct iscsi_iser_task *iser_task,
IB_MR_CHECK_SIG_STATUS, &mr_status);
if (ret) {
pr_err("ib_check_mr_status failed, ret %d\n", ret);
- goto err;
+ /* Not alot we can do, return ambiguous guard error */
+ *sector = 0;
+ return 0x1;
}
if (mr_status.fail_status & IB_MR_CHECK_SIG_STATUS) {
@@ -1152,9 +1154,6 @@ u8 iser_check_task_pi_status(struct iscsi_iser_task *iser_task,
}
return 0;
-err:
- /* Not alot we can do here, return ambiguous guard error */
- return 0x1;
}
void iser_err_comp(struct ib_wc *wc, const char *type)
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iser: set sector for ambiguous mr status errors
2018-11-14 18:17 [PATCH] iser: set sector for ambiguous mr status errors Sagi Grimberg
@ 2018-11-21 23:02 ` Jason Gunthorpe
0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2018-11-21 23:02 UTC (permalink / raw)
To: Sagi Grimberg; +Cc: linux-rdma, linux-scsi, Dan Carpenter, stable
On Wed, Nov 14, 2018 at 10:17:01AM -0800, Sagi Grimberg wrote:
> If for some reason we failed to query the mr status, we need to make sure
> to provide sufficient information for an ambiguous error (guard error on
> sector 0).
>
> Fixes: 0a7a08ad6f5f ("IB/iser: Implement check_protection")
> Cc: <stable@vger.kernel.org>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
> ---
> drivers/infiniband/ulp/iser/iser_verbs.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
Applied to for-rc
Thanks,
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-21 23:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-14 18:17 [PATCH] iser: set sector for ambiguous mr status errors Sagi Grimberg
2018-11-21 23:02 ` Jason Gunthorpe
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).