]> asedeno.scripts.mit.edu Git - linux.git/commit
s390/numa: always use logical cpu and core ids
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 2 Dec 2016 12:16:02 +0000 (13:16 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 7 Dec 2016 06:22:41 +0000 (07:22 +0100)
commit307b3114eff6ba981c8eddbce327b4a82158bfe3
treea167d837d59f4197575f8b6bf84decbd3d97aafa
parent11a247e376669323b0d9f56fbdb5c163c6310112
s390/numa: always use logical cpu and core ids

The toptree algorithm uses the physical core ids to create a mapping
between cores and nodes (to_node_id array within emu_cores structure).
The core ids are used as an index into an array which size depends on
CONFIG_NR_CPUS. If the physical core ids are larger, this will result
in out-of-bounds write accesses.

Generate logical core ids instead to avoid this.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/smp.h
arch/s390/numa/mode_emu.c