From mboxrd@z Thu Jan 1 00:00:00 1970 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 B0C17C433EF for ; Tue, 1 Feb 2022 15:46:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 017346B01F7; Tue, 1 Feb 2022 10:46:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F091D6B01F9; Tue, 1 Feb 2022 10:46:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DD0886B01FA; Tue, 1 Feb 2022 10:46:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0189.hostedemail.com [216.40.44.189]) by kanga.kvack.org (Postfix) with ESMTP id CB3946B01F7 for ; Tue, 1 Feb 2022 10:46:34 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 89554998C6 for ; Tue, 1 Feb 2022 15:46:34 +0000 (UTC) X-FDA: 79094638308.10.FDD2624 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf31.hostedemail.com (Postfix) with ESMTP id B312C2000A for ; Tue, 1 Feb 2022 15:46:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=J37g/qw11PBIOV70joTTt9Lu2LhqZ7hT2hHJzyR4cr4=; b=VmXfXc2KAV7BI3tmvkYNzThfJ2 2A/C7e0z4QYIhdpainF/FKkv7AVmASwFimkYDZyLRcoY8c57xYtEsvGiIxOnZWx543x6zXAiaSZXa R9twcKsIB+TWtGmxpWuUMFm63Y2cNe7rXTxa+nEqcuWf+nhTdFW1ITkBLAf4S50r2XIkzl5s3nLRl WAQ20AW62CeNKCJAM7jpiGw/zuF2pHMGIztWXo9Csi5ADFo/jowairf1+qlNikYYNNO510CLO/hL9 kxle83M5X1RSUvWdUV4rJK/ysp4XYzOMbEquyk6EooIEN57wouNxyDGqUWOqs3PzsuI/wgmc7f+9Z baYBk4aA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEvMC-00CYAT-67; Tue, 01 Feb 2022 15:46:12 +0000 Date: Tue, 1 Feb 2022 15:46:12 +0000 From: Matthew Wilcox To: Joao Martins Cc: Jane Chu , Naoya Horiguchi , linux-mm@kvack.org, Andrew Morton Subject: Re: [RFC] Missing compound_head() in memory-failure Message-ID: References: <30a327fd-ae49-7412-ef77-9ec19480626e@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <30a327fd-ae49-7412-ef77-9ec19480626e@oracle.com> X-Rspam-User: nil X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: B312C2000A X-Stat-Signature: aogr1hajghq3w5wr46uiyzpe9qppry81 Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=VmXfXc2K; spf=none (imf31.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-HE-Tag: 1643730393-951823 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: On Mon, Jan 31, 2022 at 08:54:39PM +0000, Joao Martins wrote: > On 1/31/22 20:29, Matthew Wilcox wrote: > > Unless I am mistaken, you have to pass the compound head of the page > > which has the error to collect_procs(). Am I mistaken? > > > -rc2 already has a fix for it: > > https://lore.kernel.org/linux-mm/20220129021420.PgBIZm-q9%25akpm@linux-foundation.org/ > > Earlier in that function there's a: > > page = compound_head(page); > > So the @page passed to collect_procs() already is a head page. It's wrong though ;-( You set the HWPoison bit on the page after calling compound_head(), so you set the bit on the head page instead of the precise page that had the poison. I'm fixing this up as part of the folio patches, but you may wish to fix it earlier than that.