]> 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)
commit1b9a08de17d67c8f733db9b9d8063ad576d0c2f9
treeda8ffdc9d8bddfd6be9e7d378c360a09c2f2001b
parente62bff0ebf49e3421ed831b38645b2645756a511
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: 6f0c7df0c956 ("mm, memory_hotplug: do not associate hotadded memory to zones until online") [visible after ce83b9d4f0076]
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