Skip to content

Commit

Permalink
s390/topology: correct allocation of topology information
Browse files Browse the repository at this point in the history
The data stored by the STSI instruction can be up to a page in size
but the memblock_virt_alloc allocation for tl_info only specifies
16 bytes. The memory after the short allocation is overwritten
every time arch_update_cpu_topology is called.

Fixes: 8c91058 "s390/numa: establish cpu to node mapping early"
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Martin Schwidefsky committed Feb 7, 2017
1 parent da8fd82 commit 8676caa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/kernel/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ void __init topology_init_early(void)
set_sched_topology(s390_topology);
if (!MACHINE_HAS_TOPOLOGY)
goto out;
tl_info = memblock_virt_alloc(sizeof(*tl_info), PAGE_SIZE);
tl_info = memblock_virt_alloc(PAGE_SIZE, PAGE_SIZE);
info = tl_info;
store_topology(info);
pr_info("The CPU configuration topology of the machine is: %d %d %d %d %d %d / %d\n",
Expand Down

0 comments on commit 8676caa

Please sign in to comment.