Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp840302imu; Tue, 11 Dec 2018 08:21:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/VZMP4rMQ9yTevc7rBiQQs+qAwSrDlqpjCm5+tbjTTOi8CwYw8Bjztav0Lv9sb0/p7PvRp4 X-Received: by 2002:a62:345:: with SMTP id 66mr16790168pfd.189.1544545273525; Tue, 11 Dec 2018 08:21:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544545273; cv=none; d=google.com; s=arc-20160816; b=YWw/yqE8uiC20UvyjsPFDiTzP9S6fOjVmbEtJs5GPILHzLnrLDzjBTbhn5+N8ceFUz KPkYVAIhInGnwEmCa16b7J9toA61swJ+/hxYA3Yh03u3gIkRmlO9ewPLDGWcKb25mRNV pUz9sa8MWs9EyjxxqOTZUiqXuSmmfb7VrNwC/yDbNVbq5fJeWe09nhPh+4b3AgqftyP3 Un6nYyTVahi6i1+GLENxrcZ7KMo6rTGFYsyz0eJccsZwEe7XBpWu9xCIcYV/C39lPFdC JPp14d0wduVQ2YcnRpgBLiqGH/Qs6Spu7jUSTgtk4FoDfb4xhMjA0opT+CmJvjsAIejC cMKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8MhwKO72ZGY9/6m40vnmprnDq1AUl1JTG1UQFocDpVM=; b=hSdv0+7PDQ4d0jDuBcJa5VRgKXpL2vIgpntAE1asaHpCQJs4D0HBkWmszglFGpsnwX 1bHdyjY4wxiS1jU90BSqNjFFRmKCb712Jt6kcIwDhHcRTVdUSEN73LoHzLB23fmvnXlX gc96LbjHa2qiZq1R1usDXZo6cWXVwHyXF5OKs/JyOy88BAooUevWTi/ItaKtTLsfPhQ4 8Nz6NDXraGKx+BUF4x9KfE7+vmyLzPhgcNu49LmgeY9Ff90cTOG5cfe7H/No36ayPbBY db2Q4pMteB907+aDTW+0z9hBPc5Fu6PY4YEtqtYB5+Rn84nDSAH9y7tl1OQ3xQAcEO5n T/Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ic8lCY+i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a18si12578665pgj.77.2018.12.11.08.20.57; Tue, 11 Dec 2018 08:21:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ic8lCY+i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728216AbeLKPpx (ORCPT + 99 others); Tue, 11 Dec 2018 10:45:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:34230 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728199AbeLKPpv (ORCPT ); Tue, 11 Dec 2018 10:45:51 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 82CA220870; Tue, 11 Dec 2018 15:45:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544543151; bh=dynoOLV5l/NVd1fEKjEBJiE8eo9+DrtNxWiKtSbQsAo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ic8lCY+iDFkWEkyCWfwCOTjmWJdmJrdOjxC9pCk/i/7IvVYx/lqsiXcR86ZLS/BB6 3/h1e6QLsIdwaPLphnH51CEx5FJDOTtYbveP4+ZIAM1iwVxnp5nCYLkliX7oQMQWaG FkODyZ793zkGae5BNoxy5GKi99B+2EvyWNpo0VQ4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Sagi Grimberg , Jason Gunthorpe Subject: [PATCH 4.4 32/91] iser: set sector for ambiguous mr status errors Date: Tue, 11 Dec 2018 16:40:51 +0100 Message-Id: <20181211151608.395828609@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151606.026852373@linuxfoundation.org> References: <20181211151606.026852373@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sagi Grimberg commit 24c3456c8d5ee6fc1933ca40f7b4406130682668 upstream. If for some reason we failed to query the mr status, we need to make sure to provide sufficient information for an ambiguous error (guard error on sector 0). Fixes: 0a7a08ad6f5f ("IB/iser: Implement check_protection") Cc: Reported-by: Dan Carpenter Signed-off-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/ulp/iser/iser_verbs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c @@ -1289,7 +1289,9 @@ u8 iser_check_task_pi_status(struct iscs IB_MR_CHECK_SIG_STATUS, &mr_status); if (ret) { pr_err("ib_check_mr_status failed, ret %d\n", ret); - goto err; + /* Not a lot we can do, return ambiguous guard error */ + *sector = 0; + return 0x1; } if (mr_status.fail_status & IB_MR_CHECK_SIG_STATUS) { @@ -1317,7 +1319,4 @@ u8 iser_check_task_pi_status(struct iscs } return 0; -err: - /* Not alot we can do here, return ambiguous guard error */ - return 0x1; }