linux/drivers/infiniband/ulp
Sergey Gorenko 7cc625c563 IB/iser: Fix login with authentication
commit d6d142cb7f upstream.

The iSER Initiator uses two types of receive buffers:

  - one big login buffer posted by iser_post_recvl();
  - several small message buffers posted by iser_post_recvm().

The login buffer is used at the login phase and full feature phase in
the discovery session. It may take a few requests and responses to
complete the login phase. The message buffers are only used in the
normal operational session at the full feature phase.

After the commit referred in the fixes line, the login operation fails
if the authentication is enabled. That happens because the Initiator
posts a small receive buffer after the first response from Target. So,
the next send operation fails because Target's second response does not
fit into the small receive buffer.

This commit adds additional checks to prevent posting small receive
buffers until the full feature phase.

Fixes: 39b169ea0d ("IB/iser: Fix RNR errors")
Link: https://lore.kernel.org/r/20220805060135.18493-1-sergeygo@nvidia.com
Signed-off-by: Sergey Gorenko <sergeygo@nvidia.com>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2022-08-25 11:45:29 +02:00
..
ipoib RDMA: Split kernel-only global device caps from uverbs device caps 2022-04-06 15:02:13 -03:00
iser IB/iser: Fix login with authentication 2022-08-25 11:45:29 +02:00
isert v5.19 pull request 2022-05-26 21:08:40 -07:00
opa_vnic RDMA/opa: Delete useless module.h include 2022-01-28 13:03:14 -04:00
rtrs RDMA/rtrs-clt: Replace list_next_or_null_rr_rcu with an inline function 2022-08-17 15:15:34 +02:00
srp RDMA: Split kernel-only global device caps from uverbs device caps 2022-04-06 15:02:13 -03:00
srpt RDMA/srpt: Fix a use-after-free 2022-08-17 15:15:40 +02:00
Makefile RDMA/rtrs: include client and server modules into kernel compilation 2020-05-17 18:57:15 -03:00