Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10794847imu; Thu, 6 Dec 2018 06:57:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/WOTCb1bNmSNu2zg4ewyZjXqQD4o/8qQfD3gc67o1OMDmWKZxaaGW4YdUZFCfFAkZNBmiiX X-Received: by 2002:a62:d2c1:: with SMTP id c184mr29123527pfg.248.1544108233380; Thu, 06 Dec 2018 06:57:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544108233; cv=none; d=google.com; s=arc-20160816; b=F0OknO3YMh0PJ9vdFR1wUlti95wacbSUPepRAazkrO4uK6U8NLqLWkNcCbTaryvTPp +hfYlTLRZ24ib5lU3bj3lqVHjrcwq0R4exmH3/apfkUMIp+SPJRRcdl6N2qXWnY91OzQ 7Ok06gz3NdbFuEf6XnyRppzLcJ6eo2ELI682PL1BdQg1UfQ3G9vgBRTIHFeRxidXdNpX CtSzf+seBFYsgzkKnTdy0KIxpBRKzKEMEUHj6dHDYud3+OPL+ryqqOs5r65PpAqaQF4z ayI7IG6A2eamZuP+ryshke4zxCG7gNqIutdZnVKmK/D+d03LdPh6myngRuWQeNHoRTf3 JeMg== 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=d0bkBqTk+W9NvHu1mi341LmtYFIyhSWeAAyHRNhsXKk=; b=holQF1nIcMDILPwHxuxJkUK2mdTtDMs1D1XjYSkNw9e4ZUHVNt9Le/pB/+TUoGai7e oSVRkPw4z1uMGc9GTKX/Tf6XFMB/1YIbpVcHsIAA/SDZoUd8frdkc5FcSKcuWUp861Jq 4JmzWLxtuO0pAOcIgtdfxUbIrpxvRSQcKphWS5zRfsH9Gnr4GqNud6ek8z1i7S3kqQje /3cZvNq+F3UL5Tf7CjzpeKeVOu8GCrGQECvqID5i7WxL32RMh6mxt30G5Ug2n66rrqA2 /VhHoOB9FLCXapOgDE1xyRa1IVKPYXESunNGkL7mDIlP8rFcsUo4iErUjU70ZGTFwrz5 73qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cDyOy7e2; 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 189si379524pgh.320.2018.12.06.06.56.57; Thu, 06 Dec 2018 06:57: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=cDyOy7e2; 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 S1730293AbeLFOoR (ORCPT + 99 others); Thu, 6 Dec 2018 09:44:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:48868 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730810AbeLFOoQ (ORCPT ); Thu, 6 Dec 2018 09:44:16 -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 00E9520661; Thu, 6 Dec 2018 14:44:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544107455; bh=jauIOnLMSuT1MYajvg59O8W++NLatCMI4W8RLqv4CB4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cDyOy7e2aS0EQGisDR1RGrjeowz1VVrGHBgRZb/BRwtBI2z+9eZMFdOIo5jwnUKlN by/fjfwy2dReugJKduN+aZlNidZiJdqtc4YKzRXj2VrzLlGfbqGq1RByFLIrP8aInv DlAg6zeIGam+cL2SBuGKnwURuKc12+MUE3fyp1Nw= 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.9 013/101] iser: set sector for ambiguous mr status errors Date: Thu, 6 Dec 2018 15:38:12 +0100 Message-Id: <20181206143012.322948317@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181206143011.174892052@linuxfoundation.org> References: <20181206143011.174892052@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.9-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 @@ -1110,7 +1110,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) { @@ -1138,9 +1140,6 @@ u8 iser_check_task_pi_status(struct iscs } return 0; -err: - /* Not alot we can do here, return ambiguous guard error */ - return 0x1; } void iser_err_comp(struct ib_wc *wc, const char *type)