From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751139AbdLWJy2 (ORCPT ); Sat, 23 Dec 2017 04:54:28 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:32926 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750713AbdLWJyW (ORCPT ); Sat, 23 Dec 2017 04:54:22 -0500 X-Google-Smtp-Source: ACJfBosDIaphdKQTw4HdWvleHiKDFAaMM7GBv6fUXIjWNtOEKgiBUu0irXCwFhahKQv/7okQMikCcA== Date: Sat, 23 Dec 2017 12:54:19 +0300 From: "Kirill A. Shutemov" To: Baoquan He Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Atsushi Kumagai , linux-mm@kvack.org Subject: Re: [PATCH] mm/sparse.c: Wrong allocation for mem_section Message-ID: <20171223095419.73wtz3qyou675zfk@node.shutemov.name> References: <1513932498-20350-1-git-send-email-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1513932498-20350-1-git-send-email-bhe@redhat.com> User-Agent: NeoMutt/20171208 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 22, 2017 at 04:48:18PM +0800, Baoquan He wrote: > In commit > > 83e3c48729 "mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y" > > mem_section is allocated at runtime to save memory. While it allocates > the first dimension of array with sizeof(struct mem_section). It costs > extra memory, should be sizeof(struct mem_section*). > > Fix it. > > Signed-off-by: Baoquan He > Tested-by: Dave Young > Cc: Ingo Molnar > Cc: Andrew Morton > Cc: Andy Lutomirski > Cc: Peter Zijlstra > Cc: Thomas Gleixner > Cc: Atsushi Kumagai > Cc: linux-mm@kvack.org Ughh. Sorry. Acked-by: Kirill A. Shutemov Please queue it to stable. -- Kirill A. Shutemov