linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Joao Martins <joao.m.martins@oracle.com>, Jane Chu <jane.chu@oracle.com>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>,
	linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>
Subject: [RFC] Missing compound_head() in memory-failure
Date: Mon, 31 Jan 2022 20:29:08 +0000	[thread overview]
Message-ID: <YfhGlAXrJIC46lrY@casper.infradead.org> (raw)

Unless I am mistaken, you have to pass the compound head of the page
which has the error to collect_procs().  Am I mistaken?

(found by code inspection as part of the folio work; I think
collect_procs() needs to take a folio, which would eliminate this class
of errors)

+++ b/mm/memory-failure.c
@@ -1633,7 +1633,7 @@ static int memory_failure_dev_pagemap(unsigned long pfn, int flags,
         * SIGBUS (i.e. MF_MUST_KILL)
         */
        flags |= MF_ACTION_REQUIRED | MF_MUST_KILL;
-       collect_procs(page, &tokill, flags & MF_ACTION_REQUIRED);
+       collect_procs(compound_head(page), &tokill, flags & MF_ACTION_REQUIRED);

        list_for_each_entry(tk, &tokill, nd)
                if (tk->size_shift)




             reply	other threads:[~2022-01-31 20:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31 20:29 Matthew Wilcox [this message]
2022-01-31 20:54 ` Joao Martins
2022-02-01  2:34   ` Matthew Wilcox
2022-02-01 15:46   ` Matthew Wilcox
2022-02-01 16:01     ` Joao Martins
2022-02-01 17:40       ` Joao Martins
2022-02-01 17:47         ` Matthew Wilcox
2022-02-01 18:34           ` Joao Martins
2022-02-01 21:11     ` Jane Chu
2022-02-01 22:04       ` Joao Martins
2022-02-01 22:20         ` Dan Williams
2022-02-01 23:04           ` Jane Chu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YfhGlAXrJIC46lrY@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=jane.chu@oracle.com \
    --cc=joao.m.martins@oracle.com \
    --cc=linux-mm@kvack.org \
    --cc=naoya.horiguchi@nec.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox