All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Missing compound_head() in memory-failure
@ 2022-01-31 20:29 Matthew Wilcox
  2022-01-31 20:54 ` Joao Martins
  0 siblings, 1 reply; 12+ messages in thread
From: Matthew Wilcox @ 2022-01-31 20:29 UTC (permalink / raw)
  To: Joao Martins, Jane Chu; +Cc: Naoya Horiguchi, linux-mm, Andrew Morton

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)




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-02-01 23:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-31 20:29 [RFC] Missing compound_head() in memory-failure Matthew Wilcox
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.