提交 61c963ab 编写于 作者: S Sagi Grimberg 提交者: Greg Kroah-Hartman

iser: set sector for ambiguous mr status errors

commit 24c3456c8d5ee6fc1933ca40f7b4406130682668 upstream.

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: 0a7a08ad ("IB/iser: Implement check_protection")
Cc: <stable@vger.kernel.org>
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NSagi Grimberg <sagi@grimberg.me>
Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 0448ad42
...@@ -1123,7 +1123,9 @@ u8 iser_check_task_pi_status(struct iscsi_iser_task *iser_task, ...@@ -1123,7 +1123,9 @@ u8 iser_check_task_pi_status(struct iscsi_iser_task *iser_task,
IB_MR_CHECK_SIG_STATUS, &mr_status); IB_MR_CHECK_SIG_STATUS, &mr_status);
if (ret) { if (ret) {
pr_err("ib_check_mr_status failed, ret %d\n", ret); pr_err("ib_check_mr_status failed, ret %d\n", ret);
goto err; /* Not a lot we can do, return ambiguous guard error */
*sector = 0;
return 0x1;
} }
if (mr_status.fail_status & IB_MR_CHECK_SIG_STATUS) { if (mr_status.fail_status & IB_MR_CHECK_SIG_STATUS) {
...@@ -1151,9 +1153,6 @@ u8 iser_check_task_pi_status(struct iscsi_iser_task *iser_task, ...@@ -1151,9 +1153,6 @@ u8 iser_check_task_pi_status(struct iscsi_iser_task *iser_task,
} }
return 0; 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) void iser_err_comp(struct ib_wc *wc, const char *type)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册