arm64: kaslr: support randomized module area with KASAN_VMALLOC
[linux-2.6-microblaze.git] / mm / memory-failure.c
index 55c6719..24210c9 100644 (file)
@@ -1312,6 +1312,12 @@ static int memory_failure_dev_pagemap(unsigned long pfn, int flags,
                 */
                put_page(page);
 
+       /* device metadata space is not recoverable */
+       if (!pgmap_pfn_valid(pgmap, pfn)) {
+               rc = -ENXIO;
+               goto out;
+       }
+
        /*
         * Prevent the inode from being freed while we are interrogating
         * the address_space, typically this would be handled by