[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <398b8217-4d67-4a9d-26c3-872dbd575dce@suse.cz>
Date: Thu, 24 Aug 2017 14:21:07 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Pavel Tatashin <pasha.tatashin@...cle.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
mhocko@...nel.org, akpm@...ux-foundation.org,
terraluna977@...il.com, stable <stable@...r.kernel.org>
Subject: Re: [PATCH v1 1/1] mm: Reversed logic in memblock_discard
+CC stable
On 08/23/2017 08:04 PM, Pavel Tatashin wrote:
> In recently introduced memblock_discard() there is a reversed logic bug.
> Memory is freed of static array instead of dynamically allocated one.
>
> Fixes: 3010f876500f ("mm: discard memblock data later")
That patch was CC'd stable. So this one should be too. Looks like it the
original patch wasn't yet included in a stable release, so we can avoid
breakage.
> Reported-and-tested-by: Woody Suwalski <terraluna977@...il.com>
> Signed-off-by: Pavel Tatashin <pasha.tatashin@...cle.com>
> ---
> mm/memblock.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/memblock.c b/mm/memblock.c
> index bf14aea6ab70..91205780e6b1 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -299,7 +299,7 @@ void __init memblock_discard(void)
> __memblock_free_late(addr, size);
> }
>
> - if (memblock.memory.regions == memblock_memory_init_regions) {
> + if (memblock.memory.regions != memblock_memory_init_regions) {
> addr = __pa(memblock.memory.regions);
> size = PAGE_ALIGN(sizeof(struct memblock_region) *
> memblock.memory.max);
>
Powered by blists - more mailing lists