Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4624176pxj; Wed, 12 May 2021 09:28:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyFvwkRxcwk3kE6Qhi/1EAh4X1qhKf+jLZFwBAVxi2lcyR3Jp+0ziZYr1mc60sciJKotBU X-Received: by 2002:a05:6402:406:: with SMTP id q6mr42446854edv.110.1620836924135; Wed, 12 May 2021 09:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620836924; cv=none; d=google.com; s=arc-20160816; b=muo6xAfv5E11PPS/kZe8CGXC7Z1qBa9luiYR0EMtdrvLhv5cYD7oAw1qvtDUqkKUsv 6Cb5DTxeA//VMDAaFELQ4pnOCFBmlp0rzNgiVrvPv2z5qDr6+hJQdCoP08yQvR6UefV0 w9zZ4bHx5HcZRX7evzvwsKEMjuBARRbOjuGwaENYZLXutYgem/vJffgx9YnaBCaK2QpP wz/AdvgpQv0SWaJykwjC6SB5GsQzbmckRBQ80+p1lmNuSivhHZDoc/n5AAsWyC9k+Jgl htWeuIFScVGWpr0Itace/m0mBnWGnb+gJC242AHfv9QDqC8ESowfVdGfFwLSdPjm/iPG Nn7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7xsYu+qWTd1/VsakStqjowB7Dy9aJXjjtyOBAKGGCLc=; b=xKY5csHruykXumVqXuwb6aVwYQ3f6DjGlRbHoHhrg0jXfbasNSoYzKh8UE5Ae4LChg fVGyaXB+mSN07mO9806ag1t1MX4kWb5HpDlxvgJPPcXCHdFrCjsONddqzozioTdrE4XV wOE89JBOa7NkuO+YYQ1/le1fQvMiqOZtlp3MvaeKVWah5RJJu9HLZMet8QTnI4pQEyr7 cBJTUm/2vhMSPxXQpAz/zPbRADBXQE7y49qbrWrzY16CNISdtxnW97PwqeSJMNHlBcma 7L6CqzIVm9kwfweBfbaaLE1rYY0L7fKTUnMzXHJxwLjykZFN/iIw+aOVJmrOREDlJr0U DwEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Uiu9vaje; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn20si456815ejc.545.2021.05.12.09.28.19; Wed, 12 May 2021 09:28:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Uiu9vaje; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241554AbhELQ1e (ORCPT + 99 others); Wed, 12 May 2021 12:27:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:56600 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230375AbhELPiC (ORCPT ); Wed, 12 May 2021 11:38:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E99C961C5E; Wed, 12 May 2021 15:19:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832795; bh=yRYCMe4VsGYbsp26cu7UwRXslGzGSKmQ/FHUDH2p5ow=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uiu9vajeAjXC1yOdDti2rvp6h7k0mE9vi4qYgzdsMqDWJqunIF0gAZ7kjx4ewIvmX iYB6yPe4C552OLbpAQTui198l4XA4JMmujq9cucKgCRAXqbXvUUPAkf+SxN+P9tHYG F8TzkKMo5yFqAysFnW7XpcfSNv2OKL/DGXZLbEs4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Wang Wensheng , Bart Van Assche , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.10 426/530] RDMA/srpt: Fix error return code in srpt_cm_req_recv() Date: Wed, 12 May 2021 16:48:56 +0200 Message-Id: <20210512144833.771398721@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wang Wensheng [ Upstream commit 6bc950beff0c440ac567cdc4e7f4542a9920953d ] 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") Link: https://lore.kernel.org/r/20210408113132.87250-1-wangwensheng4@huawei.com Reported-by: Hulk Robot Signed-off-by: Wang Wensheng Reviewed-by: Bart Van Assche Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- 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 53a8becac827..07ecc7dc1822 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -2378,6 +2378,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; } -- 2.30.2