public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Wang Wensheng <wangwensheng4@huawei.com>,
	dledford@redhat.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org,
	target-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: rui.xiang@huawei.com
Subject: Re: [PATCH -next] RDMA/srpt: Fix error return code in srpt_cm_req_recv()
Date: Mon, 12 Apr 2021 11:47:40 -0700	[thread overview]
Message-ID: <cdb4321e-99cd-2ca3-fd6e-e273c5000165@acm.org> (raw)
In-Reply-To: <20210408113132.87250-1-wangwensheng4@huawei.com>

On 4/8/21 4:31 AM, Wang Wensheng wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: db7683d7deb2 ("IB/srpt: Fix login-related race conditions")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
> ---
>  drivers/infiniband/ulp/srpt/ib_srpt.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
> index 98a393d..ea44780 100644
> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> @@ -2382,6 +2382,7 @@ static int srpt_cm_req_recv(struct srpt_device *const sdev,
>  		pr_info("rejected SRP_LOGIN_REQ because target %s_%d is not enabled\n",
>  			dev_name(&sdev->device->dev), port_num);
>  		mutex_unlock(&sport->mutex);
> +		ret = -EINVAL;
>  		goto reject;
>  	}

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

      parent reply	other threads:[~2021-04-12 18:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 11:31 [PATCH -next] RDMA/srpt: Fix error return code in srpt_cm_req_recv() Wang Wensheng
2021-04-08 16:50 ` Bart Van Assche
2021-04-12 18:09   ` Jason Gunthorpe
2021-04-12 18:46     ` Bart Van Assche
2021-04-12 18:47 ` Bart Van Assche [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=cdb4321e-99cd-2ca3-fd6e-e273c5000165@acm.org \
    --to=bvanassche@acm.org \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rui.xiang@huawei.com \
    --cc=target-devel@vger.kernel.org \
    --cc=wangwensheng4@huawei.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