linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Sergey Gorenko <sergeygo@mellanox.com>
Cc: bvanassche@acm.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH] IB/srp: Never use immediate data if it is disabled by a user
Date: Wed, 15 Jan 2020 16:38:48 -0400	[thread overview]
Message-ID: <20200115203848.GA26741@ziepe.ca> (raw)
In-Reply-To: <20200115133055.30232-1-sergeygo@mellanox.com>

On Wed, Jan 15, 2020 at 01:30:55PM +0000, Sergey Gorenko wrote:
> 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: commit 882981f4a411 ("RDMA/srp: Add support for immediate data")
> Signed-off-by: Sergey Gorenko <sergeygo@mellanox.com>
> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  drivers/infiniband/ulp/srp/ib_srp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied to for-next, thanks

Jason

      parent reply	other threads:[~2020-01-15 20:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 13:30 [PATCH] IB/srp: Never use immediate data if it is disabled by a user Sergey Gorenko
2020-01-15 16:08 ` Bart Van Assche
2020-01-15 20:38 ` Jason Gunthorpe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200115203848.GA26741@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=bvanassche@acm.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sergeygo@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).