Thread (40 messages) 40 messages, 5 authors, 2021-08-23

Re: [PATCH RESEND v6 3/9] mm: factor helpers for memory_failure_dev_pagemap

From: Dan Williams <hidden>
Date: 2021-08-20 16:54:19
Also in: dm-devel, linux-mm, linux-xfs, lkml, nvdimm

On Thu, Aug 5, 2021 at 6:01 PM Jane Chu [off-list ref] wrote:

On 7/30/2021 3:01 AM, Shiyang Ruan wrote:
quoted
-     /*
-      * Prevent the inode from being freed while we are interrogating
-      * the address_space, typically this would be handled by
-      * lock_page(), but dax pages do not use the page lock. This
-      * also prevents changes to the mapping of this pfn until
-      * poison signaling is complete.
-      */
-     cookie = dax_lock_page(page);
-     if (!cookie)
-             goto out;
-
      if (hwpoison_filter(page)) {
              rc = 0;
-             goto unlock;
+             goto out;
      }
why isn't dax_lock_page() needed for hwpoison_filter() check?
Good catch. hwpoison_filter() is indeed consulting page->mapping->host
which needs to be synchronized against inode lifetime.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help