Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp796826imu; Tue, 11 Dec 2018 07:44:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xqx/ZiJHf6GZYmgADGBrkyH4trXThgvW50pjXp6b0aY2wextT/DdOb9xNzFxI3IQ1aB4y9 X-Received: by 2002:a17:902:b48b:: with SMTP id y11mr15883413plr.200.1544543069517; Tue, 11 Dec 2018 07:44:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544543069; cv=none; d=google.com; s=arc-20160816; b=Id1sh3njdEIcLhA0cQg3HtyJC5cxISfK9F2tQWjmhlluPxhmaVhZnh3UlBBekX9v2+ hKpejUzwkocNY4kn4HikeZgFEBt+5SqqiKfF1vofixCkQjQE2AF8pebs2vCYHRI/GUeW T70B24qygEHZBd/RfYzhoNSUL66W4n3s+hgtzFdDDI+/qQpYi6jHsNmdODnRy2YT1ZDm /VVg8im/8t47naf7hJXunK1KgO1Glb7M5mIKTsmpSrU0A3/ED1ig+FAqzxAaJz9FqQCU qCaZY/9cV8HvTvTR+SC96Y54tLlbboAIuaq25at4sB8Dp/NsAU90JbCK1v42HUDcjGXM 5o/A== 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=Kdm3XRAnpH1UZ4ULFkVTuAdR5OtoSt49iBfrXAhd1Cw=; b=t+VwBeabNXPTgHLNPP+6cfmtPetv5nHKWETnJnoV3T8eJXLcPe7TW9VLNf05gc+KWL iDBde9RCIcgikgB1tfdqF19bIKgHQaE2oPQcW5j3r9y3ajgXRVTBUcV1fRZzPl1zAqUi CjE0KtsUK/cHI22oKXuqlu5DyIbcfmxYVOOEPEhgUg2VoDlMpZAlKmkjGHRJmv3/I0cL KqSJdSXnJbnfrhOserhRWHs3/PCP3kVUILFDcXOG+kcY5EqK8Fw6ZAqtfRUcZkxwvRx4 ig4tURUPEas+Z2myLF6sr4BwONG2dzQkmhfxbKp0jigyK31PqRFrHa3nbj1adC1hWP36 iqdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xKsttWIG; 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 u202si12262059pgb.115.2018.12.11.07.44.15; Tue, 11 Dec 2018 07:44:29 -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=xKsttWIG; 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 S1727411AbeLKPnE (ORCPT + 99 others); Tue, 11 Dec 2018 10:43:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:59436 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727201AbeLKPnC (ORCPT ); Tue, 11 Dec 2018 10:43:02 -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 B22CA20855; Tue, 11 Dec 2018 15:43:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544542982; bh=QwvKISSW75lWfzS5WAFF/krtLkDpLPUcfoiuj+kGEwA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xKsttWIGx9eY8EW4i1R1sga05aZYDviVHjK6ICMo+qr2aeMRL1nexzBA0iwNAyFJu KdrHVMRpG/iiJeGg/R0UXvygBaiAf65tvQSZ4DxfGuWLsGE3XZtHGEko21bscfaDIM k0yPunEB2H4dcaEshRzf4n435ie9NAJY8YRVlS+4= 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 3.18 22/54] iser: set sector for ambiguous mr status errors Date: Tue, 11 Dec 2018 16:41:10 +0100 Message-Id: <20181211151547.212553425@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151546.010073210@linuxfoundation.org> References: <20181211151546.010073210@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 3.18-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 @@ -1280,7 +1280,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) { @@ -1308,7 +1310,4 @@ u8 iser_check_task_pi_status(struct iscs } return 0; -err: - /* Not alot we can do here, return ambiguous guard error */ - return 0x1; }