From patchwork Sun Aug 30 08:10:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muchun Song X-Patchwork-Id: 11744795 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0BB13739 for ; Sun, 30 Aug 2020 08:12:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C2A1620BED for ; Sun, 30 Aug 2020 08:12:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=bytedance-com.20150623.gappssmtp.com header.i=@bytedance-com.20150623.gappssmtp.com header.b="gvzb+apb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2A1620BED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bytedance.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C55336B0002; Sun, 30 Aug 2020 04:12:20 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C05BA6B0005; Sun, 30 Aug 2020 04:12:20 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B1BB66B0006; Sun, 30 Aug 2020 04:12:20 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id 9CA876B0002 for ; Sun, 30 Aug 2020 04:12:20 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5800E180AD802 for ; Sun, 30 Aug 2020 08:12:20 +0000 (UTC) X-FDA: 77206517640.19.bears39_580ed2427085 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id 22ED31AD1B5 for ; Sun, 30 Aug 2020 08:12:20 +0000 (UTC) X-Spam-Summary: 1,0,0,7ffa75ac1cd2511a,d41d8cd98f00b204,songmuchun@bytedance.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1437:1515:1534:1539:1568:1711:1714:1730:1747:1777:1792:2393:2559:2562:2899:3138:3139:3140:3141:3142:3876:3877:4321:5007:6114:6261:6642:6653:10004:11026:11658:11914:12297:12517:12519:12555:12895:13069:13311:13357:13894:14181:14384:14394:14721:21080:21444:21451:21627:21990:30054,0,RBL:209.85.215.169:@bytedance.com:.lbl8.mailshell.net-66.201.201.201 62.14.0.100;04ygeco8ndfzh4z83amau54hzdcpnypfu9jisd4qh1cd5kjjqp7x7xrypef8afm.6wgeigq4s8ppee4iutw856puc3gorcgo3se8u78zt7gfpfbmfeie8okxky8jay8.r-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: bears39_580ed2427085 X-Filterd-Recvd-Size: 3531 Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Sun, 30 Aug 2020 08:12:19 +0000 (UTC) Received: by mail-pg1-f169.google.com with SMTP id 31so2577648pgy.13 for ; Sun, 30 Aug 2020 01:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PAgUhU0xjT1+DLGdJJ9Io2w7gWNW2HWrdKE+ZGxRNCs=; b=gvzb+apblsXdy+1M5TBqxV7Twl+YcfSKwwo5mYxlykEA/w8PJVptt7yTiBK/QpELJ7 zs8/CRbvBgFQ8SjKuUOEAbI6LpTIppHS+1Wm2dpE7HJQdLTRBt/oQMkMH50MSvsrlsrI nroNg8ebIVNt6vg/Gzi3De2tVlu6QDKyO5n5srYMA8vZujTlMQpJ/SSBQPcAZ3L/SD69 YbRE0qioz+siivYxt0Psh1zQZhtZ+k1PuLVANuOS31lvlSGsJlu5KdfqJ21PLv5JGw// WxaWAYz9UtvhDc3r51R53lzcPYZq1DDKaIcrbYRnKt1YmhD8l2veQE4swsXioCcinIzc Ndnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PAgUhU0xjT1+DLGdJJ9Io2w7gWNW2HWrdKE+ZGxRNCs=; b=ojvewFnhEi+NwWswlcsSrsefHFWnxqDHnl3xjSecXQ57jWP0o3HKKruEu/a7HaJ7cI 7J43jvURZF/vKjtsrGL7JJl5jc6eMASMeyrvyFuvs57PQsSaXXKqmWR9x3iXc5P9MxYh OWjtyLlG/PLW4dpvW2dTyFOWkV7s3XIO9PKl3NvtfAwWqrgMSbGuOEX2jpjh77Q0z+1K JN23+lyBZjxnOSA+pwsDGnOKet35Yb/F8AZmYgMkj86cBffvdIvsSvJx41Kgs9Kf282b tKxDHlOndguPHBC9Zq3b5j+YMXjSx5JZM3+S2v8I8aeT+pEESB139ut2hNIoiSpuAGhb lWjg== X-Gm-Message-State: AOAM532HKCRSf0MkKwRQMBNlS+P9VD4wB74aV4nwmz6UEfBap66SOmH3 9VIMhksFzWFNDakWmjSBl6pEpQ== X-Google-Smtp-Source: ABdhPJypoJjBgCqz9e10W3z+JWUgVWhMpjZgA07gs54eevc1BVzaC4eWnjTMPayn0eBWw/mmU+w47A== X-Received: by 2002:aa7:918d:: with SMTP id x13mr5150473pfa.292.1598775138444; Sun, 30 Aug 2020 01:12:18 -0700 (PDT) Received: from localhost.localdomain ([103.136.221.66]) by smtp.gmail.com with ESMTPSA id g75sm4455669pfb.57.2020.08.30.01.12.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Aug 2020 01:12:18 -0700 (PDT) From: Muchun Song To: naoya.horiguchi@nec.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Muchun Song Subject: [PATCH] mm/memory-failure: Fix return wrong value when isolate page fail Date: Sun, 30 Aug 2020 16:10:53 +0800 Message-Id: <20200830081053.64981-1-songmuchun@bytedance.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122) MIME-Version: 1.0 X-Rspamd-Queue-Id: 22ED31AD1B5 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: When we isolate page fail, we should not return 0, because we do not set page HWPoison on any page. Signed-off-by: Muchun Song Acked-by: Naoya Horiguchi Reviewed-by: Oscar Salvador Acked-by: Pankaj Gupta --- mm/memory-failure.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 696505f56910..4eb3c42ffe35 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1850,6 +1850,7 @@ static int __soft_offline_page(struct page *page) } else { pr_info("soft offline: %#lx: %s isolation failed: %d, page count %d, type %lx (%pGp)\n", pfn, msg_page[huge], ret, page_count(page), page->flags, &page->flags); + ret = -EBUSY; } return ret; }