mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 16:15:11 +00:00
iser: set sector for ambiguous mr status errors
commit24c3456c8d
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:0a7a08ad6f
("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> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ad3af650aa
commit
66739379d5
1 changed files with 3 additions and 4 deletions
|
@ -1110,7 +1110,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 a lot we can do, return ambiguous guard error */
|
||||
*sector = 0;
|
||||
return 0x1;
|
||||
}
|
||||
|
||||
if (mr_status.fail_status & IB_MR_CHECK_SIG_STATUS) {
|
||||
|
@ -1138,9 +1140,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)
|
||||
|
|
Loading…
Reference in a new issue