]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memory-failure.c: don't access uninitialized memmaps in memory_failure()
authorDavid Hildenbrand <david@redhat.com>
Sat, 19 Oct 2019 03:19:23 +0000 (20:19 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 19 Oct 2019 10:32:31 +0000 (06:32 -0400)
commit220f942e4cd20974fef5e7d399b2e630aa4d3911
treeda8ffdc9d8bddfd6be9e7d378c360a09c2f2001b
parent7431d9b10741c69338055a8dd44080229e5d4cc3
mm/memory-failure.c: don't access uninitialized memmaps in memory_failure()

We should check for pfn_to_online_page() to not access uninitialized
memmaps.  Reshuffle the code so we don't have to duplicate the error
message.

Link: http://lkml.kernel.org/r/20191009142435.3975-3-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Fixes: 542db0a8566d ("mm, memory_hotplug: do not associate hotadded memory to zones until online") [visible after 4e55b6a92d7a1]
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: <stable@vger.kernel.org> [4.13+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory-failure.c