From patchwork Thu Apr 21 12:53:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12821585 Return-Path: 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 E3E49C433F5 for ; Thu, 21 Apr 2022 12:53:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6EA636B0072; Thu, 21 Apr 2022 08:53:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 69AFC6B0073; Thu, 21 Apr 2022 08:53:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 588A16B0074; Thu, 21 Apr 2022 08:53:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 49D036B0072 for ; Thu, 21 Apr 2022 08:53:26 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 1162F272A3 for ; Thu, 21 Apr 2022 12:53:26 +0000 (UTC) X-FDA: 79380877212.01.EF508BA Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf02.hostedemail.com (Postfix) with ESMTP id 3572D80029 for ; Thu, 21 Apr 2022 12:53:24 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4KkcsR5G0dzhXrW; Thu, 21 Apr 2022 20:53:15 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 21 Apr 2022 20:53:22 +0800 From: Miaohe Lin To: CC: , , , , , , , , , , , , , Subject: [PATCH v2 0/3] A few fixup patches for mm Date: Thu, 21 Apr 2022 20:53:45 +0800 Message-ID: <20220421125348.62483-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 3572D80029 X-Stat-Signature: bs16x99qkewu7ocbtwpoorucyf8awhnd Authentication-Results: imf02.hostedemail.com; dkim=none; spf=pass (imf02.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-HE-Tag: 1650545604-505038 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: Hi everyone, This series contains a few patches to avoid mapping random data if swap read fails and fix lost swap bits in unuse_pte. Also we free hwpoison and swapin error entry in madvise_free_pte_range. More details can be found in the respective changelogs. Thanks! --- v2: make the terminology consistent and collect Acked-by tag per David fix lost swap bits in unuse_pte per Peter free hwpoison and swapin error entry per Alistair Many thanks Alistair, David and Peter for review! --- Miaohe Lin (3): mm/swapfile: unuse_pte can map random data if swap read fails mm/swapfile: Fix lost swap bits in unuse_pte() mm/madvise: free hwpoison and swapin error entry in madvise_free_pte_range include/linux/swap.h | 7 ++++++- include/linux/swapops.h | 10 ++++++++++ mm/madvise.c | 13 ++++++++----- mm/memory.c | 5 ++++- mm/swapfile.c | 23 ++++++++++++++++++++--- 5 files changed, 48 insertions(+), 10 deletions(-)