Message ID | 20220914162220.787703-1-shy828301@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6BC2ECAAD3 for <linux-mm@archiver.kernel.org>; Wed, 14 Sep 2022 16:22:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3871C8D0002; Wed, 14 Sep 2022 12:22:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 337188D0001; Wed, 14 Sep 2022 12:22:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1FF6D8D0002; Wed, 14 Sep 2022 12:22:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 1366E8D0001 for <linux-mm@kvack.org>; Wed, 14 Sep 2022 12:22:25 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id DCA2740AAC for <linux-mm@kvack.org>; Wed, 14 Sep 2022 16:22:24 +0000 (UTC) X-FDA: 79911208608.17.8B56FC9 Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by imf04.hostedemail.com (Postfix) with ESMTP id 8D2A4400A5 for <linux-mm@kvack.org>; Wed, 14 Sep 2022 16:22:24 +0000 (UTC) Received: by mail-pg1-f175.google.com with SMTP id r23so6187000pgr.6 for <linux-mm@kvack.org>; Wed, 14 Sep 2022 09:22:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=QqY6zjkG7tOexQ+JjAZx9uwGMUGEwBPtZu3WWvYMDno=; b=Js3JLJVwxW6aPUc2ShK4wv7Asbdt/viVK7yBFmCA7Vzi1h3NRWCV1b7+pyzu1ocgmi yaoBZI6v+7FFkWivhycjh6Cb8zBuStOeDQtVo12O6qXycIKRrH61iDc999xoQCKv4ZMp +j/KiKsQmDrhQvhvHcQUpu401lXswdiVtRewqoIWdWFmKCQaQL9nnQBeVMkcysPB2HQ3 LJOPWpgPO92uKaXam6YL1J1OOEI19DYABLjUs+5xPv9mTMCXXkcb3yOs8jJ13/YoXxZy KykZzSLXXKPoffLpARaqo8eJAQtxyrqNSsJmC73ochewSEbMgANHABlEDIA7jllBFbgH KSSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=QqY6zjkG7tOexQ+JjAZx9uwGMUGEwBPtZu3WWvYMDno=; b=nXi0gAPzEgK4Q5XzYBH9yg1CdrTolYcYR3xfoXeeHqqlLde6cynQs42wHWTSv7U6Ej TzolAH4286UGHQAf2D5SsuT5FtVe6kOxAemfZYkhcG64VBYFbwSiUef/yhpsRkjcihTT fxZcL605LykwliT8+ID2plfpib3qEMWFRqPx4NnLcEqAQMGqoaR/4ZYmXr95lGjPywwf 51I9GosvouJeNvDylVveu65MxT1A0Tis7qzlBssmCPy5SN4zffcehl98tqOAoPqMHhVk J00hmH2EZAy3F7EbNc8JE2pMUNh0NGiUVXlDpNsIh+cjoyCVtXgF8CVpoGTxaTJSq934 yJTw== X-Gm-Message-State: ACgBeo0hgTb2Wqw1rPDcGDrc9bK2cXR/7P+z8ohc9HWgdJV2yg+CBF0f w/YqwgxZ7MdvrDuSxgMdgOGKPKrmn9k= X-Google-Smtp-Source: AA6agR4X81GW/E4KDjaiut+rqrYIpZEF2/pQBOVAZbFy5EboxvbT4KLIY1sfWf8sZQMQouCyKpsliQ== X-Received: by 2002:a63:5244:0:b0:434:a3b1:bbe8 with SMTP id s4-20020a635244000000b00434a3b1bbe8mr33036980pgl.57.1663172543519; Wed, 14 Sep 2022 09:22:23 -0700 (PDT) Received: from localhost.localdomain (c-67-174-241-145.hsd1.ca.comcast.net. [67.174.241.145]) by smtp.gmail.com with ESMTPSA id ik22-20020a170902ab1600b0016dc26c7d30sm5777187plb.164.2022.09.14.09.22.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 09:22:22 -0700 (PDT) From: Yang Shi <shy828301@gmail.com> To: zokeefe@google.com, akpm@linux-foundation.org Cc: shy828301@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [mm-unstable PATCH] mm: MADV_COLLAPSE: refetch vm_end after reacquiring mmap_lock Date: Wed, 14 Sep 2022 09:22:20 -0700 Message-Id: <20220914162220.787703-1-shy828301@gmail.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Js3JLJVw; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf04.hostedemail.com: domain of shy828301@gmail.com designates 209.85.215.175 as permitted sender) smtp.mailfrom=shy828301@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663172544; a=rsa-sha256; cv=none; b=03HZXXySrZNuxi+wFJwC7raE/LMkEjyolVfGCiwyAKNRU6vufgIxbrn2R2XOeN1B8q64Xe 2WAGbjsS3cLG370gVUWsJBWG20drHSDi6eW+6MlQ//SVlXlgh9JBgyxWjN23x7UknEGyt+ C2n22ZhLHjVGHxCWcpG0fIS0LoVfPcU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663172544; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=QqY6zjkG7tOexQ+JjAZx9uwGMUGEwBPtZu3WWvYMDno=; b=KvOOrvc8kA6b2yZ6h3IsYmTWywuvtGJ0Sxdz/jL4g7yONvLawYi0sYDHu9Kjzy/yrySzkv wJ1pEvx2vBVxZwtdmr5S1Xe0zoQZCR8ltLCdhyCKjHTskEHDp4OiGdpnM1KfaSupdIQYah JZaKaoqhWOjUQkX51XmHRutU2Xv5m30= X-Rspam-User: Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Js3JLJVw; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf04.hostedemail.com: domain of shy828301@gmail.com designates 209.85.215.175 as permitted sender) smtp.mailfrom=shy828301@gmail.com X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 8D2A4400A5 X-Stat-Signature: jatc618mn3u8x7wergb7rnuw1757fbox X-HE-Tag: 1663172544-875525 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 |
[mm-unstable] mm: MADV_COLLAPSE: refetch vm_end after reacquiring mmap_lock
|
expand
|
diff --git a/mm/khugepaged.c b/mm/khugepaged.c index a3acd3e5e0f3..1860be232a26 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -2592,6 +2592,8 @@ int madvise_collapse(struct vm_area_struct *vma, struct vm_area_struct **prev, last_fail = result; goto out_nolock; } + + hend = vma->vm_end & HPAGE_PMD_MASK; } mmap_assert_locked(mm); memset(cc->node_load, 0, sizeof(cc->node_load));