Re: [PATCH v6 03/10] mm/memory_hotplug: Don't access uninitialized memmaps in shrink_pgdat_span()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: linux-kernel@xxxxxxxxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
- Subject: Re: [PATCH v6 03/10] mm/memory_hotplug: Don't access uninitialized memmaps in shrink_pgdat_span()
- From: David Hildenbrand <david@xxxxxxxxxx>
- Date: Mon, 14 Oct 2019 11:31:14 +0200
- Cc: linux-mm@xxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, Oscar Salvador <osalvador@xxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>, Wei Yang <richardw.yang@xxxxxxxxxxxxxxx>, "Aneesh Kumar K . V" <aneesh.kumar@xxxxxxxxxxxxx>
- In-reply-to: <20191006085646.5768-4-david@redhat.com>
- Organization: Red Hat GmbH
- References: <20191006085646.5768-1-david@redhat.com> <20191006085646.5768-4-david@redhat.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0
On 06.10.19 10:56, David Hildenbrand wrote:
> We might use the nid of memmaps that were never initialized. For
> example, if the memmap was poisoned, we will crash the kernel in
> pfn_to_nid() right now. Let's use the calculated boundaries of the separate
> zones instead. This now also avoids having to iterate over a whole bunch of
> subsections again, after shrinking one zone.
>
> Before commit d0dc12e86b31 ("mm/memory_hotplug: optimize memory
> hotplug"), the memmap was initialized to 0 and the node was set to the
> right value. After that commit, the node might be garbage.
>
> We'll have to fix shrink_zone_span() next.
>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: Oscar Salvador <osalvador@xxxxxxx>
> Cc: David Hildenbrand <david@xxxxxxxxxx>
> Cc: Michal Hocko <mhocko@xxxxxxxx>
> Cc: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>
> Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
> Cc: Wei Yang <richardw.yang@xxxxxxxxxxxxxxx>
> Fixes: d0dc12e86b31 ("mm/memory_hotplug: optimize memory hotplug")
@Andrew, can you convert that to
Fixes: f1dd2cd13c4b ("mm, memory_hotplug: do not associate hotadded memory to zones until online") # visible after d0dc12e86b319
and add
Cc: stable@xxxxxxxxxxxxxxx # v4.13+
--
Thanks,
David / dhildenb
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]