[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <071d574f-1d8c-5be9-ec92-6227db01bbd3@linux.vnet.ibm.com>
Date: Fri, 6 Oct 2017 12:18:31 +0530
From: Anshuman Khandual <khandual@...ux.vnet.ibm.com>
To: Pavel Tatashin <pasha.tatashin@...cle.com>,
linux-kernel@...r.kernel.org, sparclinux@...r.kernel.org,
linux-mm@...ck.org, linuxppc-dev@...ts.ozlabs.org,
linux-s390@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
x86@...nel.org, kasan-dev@...glegroups.com, borntraeger@...ibm.com,
heiko.carstens@...ibm.com, davem@...emloft.net,
willy@...radead.org, mhocko@...nel.org, ard.biesheuvel@...aro.org,
mark.rutland@....com, will.deacon@....com, catalin.marinas@....com,
sam@...nborg.org, mgorman@...hsingularity.net,
steven.sistare@...cle.com, daniel.m.jordan@...cle.com,
bob.picco@...cle.com
Subject: Re: [PATCH] mm: deferred_init_memmap improvements
On 10/04/2017 08:59 PM, Pavel Tatashin wrote:
> This patch fixes another existing issue on systems that have holes in
> zones i.e CONFIG_HOLES_IN_ZONE is defined.
>
> In for_each_mem_pfn_range() we have code like this:
>
> if (!pfn_valid_within(pfn)
> goto free_range;
>
> Note: 'page' is not set to NULL and is not incremented but 'pfn' advances.
page is initialized to NULL at the beginning of the function.
PFN advances but we dont proceed unless pfn_valid_within(pfn)
holds true which basically should have checked with arch call
back if the PFN is valid in presence of memory holes as well.
Is not this correct ?
> Thus means if deferred struct pages are enabled on systems with these kind
> of holes, linux would get memory corruptions. I have fixed this issue by
> defining a new macro that performs all the necessary operations when we
> free the current set of pages.
If we bail out in case PFN is not valid, then how corruption
can happen ?
Powered by blists - more mailing lists