]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.9.111/ib-isert-fix-t10-pi-check-mask-setting.patch
Linux 4.14.121
[thirdparty/kernel/stable-queue.git] / releases / 4.9.111 / ib-isert-fix-t10-pi-check-mask-setting.patch
1 From 0e12af84cdd3056460f928adc164f9e87f4b303b Mon Sep 17 00:00:00 2001
2 From: Max Gurtovoy <maxg@mellanox.com>
3 Date: Thu, 31 May 2018 11:05:23 +0300
4 Subject: IB/isert: fix T10-pi check mask setting
5
6 From: Max Gurtovoy <maxg@mellanox.com>
7
8 commit 0e12af84cdd3056460f928adc164f9e87f4b303b upstream.
9
10 A copy/paste bug (probably) caused setting of an app_tag check mask
11 in case where a ref_tag check was needed.
12
13 Fixes: 38a2d0d429f1 ("IB/isert: convert to the generic RDMA READ/WRITE API")
14 Fixes: 9e961ae73c2c ("IB/isert: Support T10-PI protected transactions")
15 Cc: stable@vger.kernel.org
16 Reviewed-by: Christoph Hellwig <hch@lst.de>
17 Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
18 Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
19 Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
20 Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23 ---
24 drivers/infiniband/ulp/isert/ib_isert.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27 --- a/drivers/infiniband/ulp/isert/ib_isert.c
28 +++ b/drivers/infiniband/ulp/isert/ib_isert.c
29 @@ -2090,7 +2090,7 @@ isert_set_sig_attrs(struct se_cmd *se_cm
30
31 sig_attrs->check_mask =
32 (se_cmd->prot_checks & TARGET_DIF_CHECK_GUARD ? 0xc0 : 0) |
33 - (se_cmd->prot_checks & TARGET_DIF_CHECK_REFTAG ? 0x30 : 0) |
34 + (se_cmd->prot_checks & TARGET_DIF_CHECK_APPTAG ? 0x30 : 0) |
35 (se_cmd->prot_checks & TARGET_DIF_CHECK_REFTAG ? 0x0f : 0);
36 return 0;
37 }