Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2023284imu; Fri, 14 Dec 2018 04:40:12 -0800 (PST) X-Google-Smtp-Source: AFSGD/WvevKV4+Qr7kJkOhhwEcHazLgcam/XKEHsrFDfeQA1mm4VKZgmrlkWxLKgjugglGejaxui X-Received: by 2002:a63:6a05:: with SMTP id f5mr2564585pgc.72.1544791212876; Fri, 14 Dec 2018 04:40:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544791212; cv=none; d=google.com; s=arc-20160816; b=bmtMgVxjz4h0G6C1rTepoapOrf03v3pETOVRTB84FrdazJ57g7XZ04SqDKWOYj/IQT ZXITs1dXT25zSx+EJIUi1ujE7ChcXffBvHXqSSirvIyLeXE/lS9eooh3k/v6jfJDfHV/ v1pQnCeet1lrZB3QMTzuo+lp01RuTFm/tugK1vNzvePAgcn0rYkR5RKZGcxi2bco+GGR UWVyqBf0OVlEQyUTTVxJpsUH3CUTMJfyccMXDIWbH6vfTGRzqvJXldurfn+adhHKc3jo eumiND2cAi9zIW44gEbpsj2WTHmRUOcha2iDcfdhrX0Vk4Ge43zNXoWtPz0ifTeZKFc8 Id+Q== 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=2BwuuB+EsCL/VF++y/DQ2caLAyIUovIF9/y5SEINZGI=; b=RzVKiijkvkY14OL9UK8fDpQHWTyO9mZPy4aKye6btAlBWzMPL0KlZVR24TMbhKVIuj lW5WihrJUB7EY8knalZckNMtS0BJtTV1oYDJzddN80Zyii0Wc5g1ShHyrlJBm6OWzFSQ hYSGnvZfaD5vwTiTTDjf2INELiWNdIwM+PHfM2aoEMY+luEjNfZf4tx/gBGX5USdnXw8 HeFoGlODwYU6sTjs5qV0aN6nt2bAF517uKqO19QQwEc+oqKJB/QvR3sBS90G5zWLFIPM aP5LvWFaY/sGyw3Kuosv9okvmrc2B+8DaAsMdByItuqJnUaBpfx3teWursQft/eVgtO6 GqTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WStJEwDD; 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 l14si3924407pgi.147.2018.12.14.04.39.58; Fri, 14 Dec 2018 04:40:12 -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=WStJEwDD; 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 S1730406AbeLNMi7 (ORCPT + 99 others); Fri, 14 Dec 2018 07:38:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:50086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730088AbeLNMFS (ORCPT ); Fri, 14 Dec 2018 07:05:18 -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 CDD0721479; Fri, 14 Dec 2018 12:05:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544789117; bh=mlTzS/pOp5LPPyaiDrapxs2PSFztz/iJfb4sPRbmvN8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WStJEwDDi8bCvN9phnF4YHDrySfIu6zXtkgHAkhvmqlHGOQ94EFLiXt2/LaiAAzqm kbQcwAnPBKRbftDaK33fkC/PgRsh/N67LPbn53Re2lc6W8Rlde7ejZ6GwuUtXI+U+z QRo2avmPcJSZ48XxkyQHJPZcNHBB7WOELJlhG/PE= 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.19 093/142] IB/mlx5: Fix page fault handling for MW Date: Fri, 14 Dec 2018 12:59:38 +0100 Message-Id: <20181214115750.774157027@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115747.053633987@linuxfoundation.org> References: <20181214115747.053633987@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.19-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 d216e0d2921d..9e1cac8cb260 100644 --- a/drivers/infiniband/hw/mlx5/odp.c +++ b/drivers/infiniband/hw/mlx5/odp.c @@ -724,6 +724,7 @@ static int pagefault_single_data_segment(struct mlx5_ib_dev *dev, head = frame; bcnt -= frame->bcnt; + offset = 0; } break; -- 2.19.1