]> git.baikalelectronics.ru Git - kernel.git/commit
sparc64: memblock resizes are not handled properly
authorPavel Tatashin <pasha.tatashin@oracle.com>
Thu, 16 Feb 2017 20:13:54 +0000 (15:13 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Feb 2017 16:33:23 +0000 (08:33 -0800)
commitc6212c451a2ff5aad789d58e4eaa9e8274336a5c
tree32f0637f630d31722523530ae4c52a470b95c765
parent295b11c4fc03234c001c390d8f8d8c5ec443b231
sparc64: memblock resizes are not handled properly

In add_node_ranges() when memblock resize happens, the iterator keeps using
the previous freed array. This bug cause hangs on machine where there are
over 128 memory blocks during boot. For example, on machines where memory
interleaving is small.
The problem is seen on T4-4 because it cant have 2T of memory, and memory
is  interleaved at 8G. So we have 2T/8G = 256 regions to set node IDs. The
starting size of regions array is 128. Thus, we have to double at least one
time (actually we have to double twice because some memory is already
reserved and thus we need more than 256 regions). We start using an
incorrect pointer to the array after the first doubling.

Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Signed-off-by: Babu Moger <babu.moger@oracle.com>
Reviewed-by: Babu Moger <babu.moger@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/mm/init_64.c