lkml.org 
[lkml]   [2014]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] numa, mem-hotplug: Fix stack overflow in numa when seting kernel nodes to unhotpluggable.
    On Wed, Jan 22, 2014 at 10:06:14PM -0800, David Rientjes wrote:
    > On Thu, 23 Jan 2014, Tang Chen wrote:
    >
    > > Dave found that the kernel will hang during boot. This is because
    > > the nodemask_t type stack variable numa_kernel_nodes is large enough
    > > to overflow the stack.
    > >
    > > This doesn't always happen. According to Dave, this happened once
    > > in about five boots. The backtrace is like the following:
    > >
    > > dump_stack
    > > panic
    > > ? numa_clear_kernel_node_hotplug
    > > __stack_chk_fail
    > > numa_clear_kernel_node_hotplug
    > > ? memblock_search_pfn_nid
    > > ? __early_pfn_to_nid
    > > numa_init
    > > x86_numa_init
    > > initmem_init
    > > setup_arch
    > > start_kernel
    > >
    > > This patch fix this problem by defining numa_kernel_nodes as a
    > > static global variable in __initdata area.
    > >
    > > Reported-by: Dave Jones <davej@redhat.com>
    > > Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
    > > Tested-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
    >
    > I guess it depends on what Dave's CONFIG_NODES_SHIFT is?

    It's 10, because I had MAXSMP set.

    So, MAX_NUMNODES = 1 << 10

    And the bitmask is made of longs. 1024 of them.

    How does this work ?

    Dave



    \
     
     \ /
      Last update: 2014-01-23 08:01    [W:5.363 / U:0.220 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site