Message ID | 20210625013914.f4FSy3CBd%akpm@linux-foundation.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=O4g6=LT=kvack.org=owner-linux-mm@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 722C7C49EAB for <linux-mm@archiver.kernel.org>; Fri, 25 Jun 2021 01:39:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 321AC613C0 for <linux-mm@archiver.kernel.org>; Fri, 25 Jun 2021 01:39:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 321AC613C0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 244CF6B005D; Thu, 24 Jun 2021 21:39:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F4D78D0007; Thu, 24 Jun 2021 21:39:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 06E738D0006; Thu, 24 Jun 2021 21:39:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0090.hostedemail.com [216.40.44.90]) by kanga.kvack.org (Postfix) with ESMTP id C23A06B005D for <linux-mm@kvack.org>; Thu, 24 Jun 2021 21:39:15 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id EE467801F622 for <linux-mm@kvack.org>; Fri, 25 Jun 2021 01:39:15 +0000 (UTC) X-FDA: 78290538270.31.4D7AF55 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf17.hostedemail.com (Postfix) with ESMTP id AC22D4080F7B for <linux-mm@kvack.org>; Fri, 25 Jun 2021 01:39:15 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 78B696044F; Fri, 25 Jun 2021 01:39:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1624585154; bh=JmjujSDruL4vbxq24MCV9pysNj4XsLMyQsStxkqC7tQ=; h=Date:From:To:Subject:In-Reply-To:From; b=WkKOZBrqJVyp+TzG1Q81ohiPUzMdlt7JrqazSVZC+Nb2os29j3SU6ewEhMsMngx9J ugdy16NhzhB/mQZYQyRqOKghM67NgjwsCKc2GsHsETdet2NZ2GCcScbEj/W4sCTz+W VWKXxSwDmHWUpqZ7OlFSUr1o5prve7FJvidm/ndY= Date: Thu, 24 Jun 2021 18:39:14 -0700 From: Andrew Morton <akpm@linux-foundation.org> To: akpm@linux-foundation.org, apopple@nvidia.com, hughd@google.com, kirill.shutemov@linux.intel.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, peterx@redhat.com, rcampbell@nvidia.com, shy828301@gmail.com, stable@vger.kernel.org, torvalds@linux-foundation.org, wangyugui@e16-tech.com, will@kernel.org, willy@infradead.org, ziy@nvidia.com Subject: [patch 05/24] mm: page_vma_mapped_walk(): crossing page table boundary Message-ID: <20210625013914.f4FSy3CBd%akpm@linux-foundation.org> In-Reply-To: <20210624183838.ac3161ca4a43989665ac8b2f@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=WkKOZBrq; spf=pass (imf17.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: AC22D4080F7B X-Stat-Signature: x61kbsooxomtei4k5p9a9ryju8j68zrm X-HE-Tag: 1624585155-875240 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
[01/24] mm: page_vma_mapped_walk(): use page for pvmw->page
|
expand
|
--- a/mm/page_vma_mapped.c~mm-page_vma_mapped_walk-crossing-page-table-boundary +++ a/mm/page_vma_mapped.c @@ -244,16 +244,16 @@ next_pte: if (pvmw->address >= end) return not_found(pvmw); /* Did we cross page table boundary? */ - if (pvmw->address % PMD_SIZE == 0) { - pte_unmap(pvmw->pte); + if ((pvmw->address & (PMD_SIZE - PAGE_SIZE)) == 0) { if (pvmw->ptl) { spin_unlock(pvmw->ptl); pvmw->ptl = NULL; } + pte_unmap(pvmw->pte); + pvmw->pte = NULL; goto restart; - } else { - pvmw->pte++; } + pvmw->pte++; } while (pte_none(*pvmw->pte)); if (!pvmw->ptl) {