linux/drivers/infiniband/ulp
Sergey Gorenko dcb30ca2ea IB/srp: Never use immediate data if it is disabled by a user
commit 0fbb37dd82 upstream.

Some SRP targets that do not support specification SRP-2, put the garbage
to the reserved bits of the SRP login response.  The problem was not
detected for a long time because the SRP initiator ignored those bits. But
now one of them is used as SRP_LOGIN_RSP_IMMED_SUPP. And it causes a
critical error on the target when the initiator sends immediate data.

The ib_srp module has a use_imm_date parameter to enable or disable
immediate data manually. But it does not help in the above case, because
use_imm_date is ignored at handling the SRP login response. The problem is
definitely caused by a bug on the target side, but the initiator's
behavior also does not look correct.  The initiator should not use
immediate data if use_imm_date is disabled by a user.

This commit adds an additional checking of use_imm_date at the handling of
SRP login response to avoid unexpected use of immediate data.

Fixes: 882981f4a4 ("RDMA/srp: Add support for immediate data")
Link: https://lore.kernel.org/r/20200115133055.30232-1-sergeygo@mellanox.com
Signed-off-by: Sergey Gorenko <sergeygo@mellanox.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2020-02-14 16:52:56 -05:00
..
ipoib IB/ipoib: Add ndo operation for getting VFs GUID attributes 2019-11-22 18:17:24 +02:00
iser infiniband: fix ulp/iser/iser_initiator.c kernel-doc warnings 2019-10-22 14:52:56 -03:00
isert scsi: RDMA/isert: Fix a recently introduced regression related to logout 2020-01-21 00:24:46 -05:00
opa_vnic treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
srp IB/srp: Never use immediate data if it is disabled by a user 2020-02-14 16:52:56 -05:00
srpt RDMA/srpt: Report the SCSI residual to the initiator 2019-11-13 15:50:41 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00