From patchwork Thu Jul 27 11:56:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12695 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp1065184vqo; Thu, 27 Jul 2023 05:34:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlE+LxQtzbNl0MN5eLbRyRTqQKtjwoNiktR2WqDyUoOlRRMg3vWCNnGP4Uij8Dd/20huIRu9 X-Received: by 2002:a17:907:2e0b:b0:992:c8d7:b66f with SMTP id ig11-20020a1709072e0b00b00992c8d7b66fmr1750882ejc.75.1690461269293; Thu, 27 Jul 2023 05:34:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690461269; cv=none; d=google.com; s=arc-20160816; b=lBu2v4HAE5EcHU+VDYsti+irGYDB7xiY6X6aLink6gJQW24kbmLkq0NxMyLwwia+FM a2brbIWTwAlLAurBACB1i4duY/tRHQSu2d1VeqVuiQ8hc6izpjlq4ocqhi+naa7acVNV 3DagSgAYQ6OTyoXGRbWRIbNXlWrx8SsRUCcFHbikT9TmofK/FMUX1P10YeKa3NexE2Cx l73wYE58H3kzEHBn4qrjceJNb6zFTUCdrzo40B5EW73e3rrl/Thf1ncDN7PNPNLQ41FU 0sA6rPyxFr2cn7hek9MKcdOxel4o5a9OxoA0icYXH23WljNe75RKbwWDyI9oRCzZfXir HBoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=a2ObeNqLteA8lFNIBDPiKE31wcX7ylRVhhAZLpJOW7M=; fh=eUbl4v09I/Ha4OhmJ6gzDr/GCs46/1skqMRau+2m7SY=; b=XxGD6EXEXqvMJF70bnUcpQIvIWhuvf8VKpHzwc4/AObyw1+Y6sVfgym7Xf2hqanoo1 XWB7rn/TRxHzmWS5WXGAO9tVvU+XPecxGqWMYUxRS0r52g8zpDH5bmXgPcqVsob1ifGM Az7rRnsVTV8fXBxp4aw4kxhwV88idspAv7E13cJXpkpUbTRktKeuOIPaA/jYZmuRJn28 mW4dm65T02cwKt0KCtjOKi4cAESlRZB9MGoXcXV8poMspW/Gu56V3FIK3C+9udr2zZMU wWe72bjUgn+x6R2RJ+B+8Ml0WsUr+sKndSmB8oXuwdIOiTe2ssfQoS2Mufz/KzQCi+/p maRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lg21-20020a170906f89500b0098759716e36si951331ejb.217.2023.07.27.05.34.01; Thu, 27 Jul 2023 05:34:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233570AbjG0L45 (ORCPT + 99 others); Thu, 27 Jul 2023 07:56:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232716AbjG0L4z (ORCPT ); Thu, 27 Jul 2023 07:56:55 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37F182733 for ; Thu, 27 Jul 2023 04:56:52 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RBTgL5ylgztRbt; Thu, 27 Jul 2023 19:53:34 +0800 (CST) Received: from huawei.com (10.174.151.185) 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.2507.27; Thu, 27 Jul 2023 19:56:49 +0800 From: Miaohe Lin To: , CC: , , , Subject: [PATCH v2 0/4] A few fixup patches for mm Date: Thu, 27 Jul 2023 19:56:39 +0800 Message-ID: <20230727115643.639741-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Originating-IP: [10.174.151.185] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772577115717935387 X-GMAIL-MSGID: 1772577115717935387 Hi everyone, This series contains a few fixup patches to fix potential unexpected return value, fix wrong swap entry type for hwpoisoned swapcache page and so on. More details can be found in the respective changelogs. Thanks! Miaohe Lin (4): mm/swapfile: fix wrong swap entry type for hwpoisoned swapcache page mm: memory-failure: fix potential unexpected return value from unpoison_memory() mm: memory-failure: avoid false hwpoison page mapped error info mm: memory-failure: add PageOffline() check --- v2: collect Reviewed-by and Acked-by tag per Matthew and Naoya. 1/4: a better fix per Matthew 2/4: fix a code smell per Naoya Thanks! --- mm/ksm.c | 2 ++ mm/memory-failure.c | 32 ++++++++++++++++++-------------- mm/swapfile.c | 8 ++++---- 3 files changed, 24 insertions(+), 18 deletions(-)