Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1992890imu; Fri, 14 Dec 2018 04:11:57 -0800 (PST) X-Google-Smtp-Source: AFSGD/V1D+olJxzXotsPjWq9fgiHe12O1zKjdz5ukTFjMUy9oUF9+FtAUlizBUpdC8G4oJ+HSOAD X-Received: by 2002:a17:902:6948:: with SMTP id k8mr2639286plt.2.1544789517478; Fri, 14 Dec 2018 04:11:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544789517; cv=none; d=google.com; s=arc-20160816; b=uxDelk8w8Fkbjl7N6DD4zVd6GlnWf+3oYL/i6ltJnQaTk6zMIO1Q4RioeWw4Vih5jn l8LEjPtvoRC+ZojIvZFwV/dDjLdsV6OEZz40IPCYA0mtgfbXLoqbQv7FwUw8wWAyBhEc cROpKuq+jk+I9t6NmT3K8uSzKzqFKb/5f68mIe92enD+ot/wwlSAJfMg//WHhoacna8i NNNCjzTV3hmDhuKzdMUq/U3gkXwiUhKa/eIHKmtmS6Lme4QQzlhxExwoR1HKqg+kmf4E D/OaBdhLcTmbeRDV9hRM1oeoBcAZRvvNNdYqmUP+4VV96DNUuTL+1yg+OioTX3S66DH9 akpQ== 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=aQlFpyLJYf3WJc6QyHgXFDKxs5hS3Oqa/y6D3+7Ze7k=; b=lDplpyp3TQ4jU/Z7AE5DjmneZaNMLuYlmS3r6rpBjprZsxDaIclnCWBZHnXBPMPktA hLHf6GVvB/FSd4/oRVzta41+qVy1RdKtCCTAKNdJGmiX/p4gBJ3zE8hjN4xAu+wgmDt2 Fvi7PU9RAgvgt+2PUJSn0cowLeZA9mGoDP+UoxsEIYLFPZeFS0vXx0fQqf26k+R9DBO3 Vqw3ua+A3f7IDFUKDilL8SmDWunFlpc6o3BbVB4U9eNFobPgCiyvhrHMWsb5dINAvOSw jryMcRy/JQFpJFXNn3mhtqCmBGhgl/WORe/vRVGASsaKbEpe3KE5zL5NSfOYOyjgM5/8 fQLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="z/hXtyRm"; 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 z12si3783537plk.90.2018.12.14.04.11.42; Fri, 14 Dec 2018 04:11:57 -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="z/hXtyRm"; 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 S1730705AbeLNMJ1 (ORCPT + 99 others); Fri, 14 Dec 2018 07:09:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:55128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731447AbeLNMJZ (ORCPT ); Fri, 14 Dec 2018 07:09:25 -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 F01E52147D; Fri, 14 Dec 2018 12:09:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544789364; bh=/bzVTxoPPTpyckv0lQA1d7DvwcKYwpb504TtGC34/TE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z/hXtyRmO1hneoEabKyJdsWyh1s3Fp2EF/9C/m1XgLQfsdYXIaP8SlxRp4xARXkCg qf/sXVv02DjQ5V16TyyOoH+s6JNBPbuwgqB9GdJzv1+IVT+WbD1JA/d5/nW4PrTNRx 7oPlJH4JRD5NC/MBNi1OTG8gl+rnlgTJgqeFkVbE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Artemy Kovalyov , Moni Shoua , Leon Romanovsky , Jason Gunthorpe , Sasha Levin Subject: [PATCH 4.14 54/89] IB/mlx5: Fix page fault handling for MW Date: Fri, 14 Dec 2018 13:00:07 +0100 Message-Id: <20181214115732.340971260@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115729.658859279@linuxfoundation.org> References: <20181214115729.658859279@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.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 75b7b86bdb0df37e08e44b6c1f99010967f81944 ] Memory windows are implemented with an indirect MKey, when a page fault event comes for a MW Mkey we need to find the MR at the end of the list of the indirect MKeys by iterating on all items from the first to the last. The offset calculated during this process has to be zeroed after the first iteration or the next iteration will start from a wrong address, resulting incorrect ODP faulting behavior. Fixes: db570d7deafb ("IB/mlx5: Add ODP support to MW") Signed-off-by: Artemy Kovalyov Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/mlx5/odp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c index 3d701c7a4c91..1ed94b6c0b0a 100644 --- a/drivers/infiniband/hw/mlx5/odp.c +++ b/drivers/infiniband/hw/mlx5/odp.c @@ -723,6 +723,7 @@ static int pagefault_single_data_segment(struct mlx5_ib_dev *dev, head = frame; bcnt -= frame->bcnt; + offset = 0; } break; -- 2.19.1