]> git.openpandora.org Git - pandora-kernel.git/commitdiff
s390/cacheinfo: don't use smp_processor_id() in preemptible context
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 9 Feb 2015 11:54:16 +0000 (12:54 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 10 Feb 2015 09:15:57 +0000 (10:15 +0100)
show_cacheinfo() needs to access the cacheinfo structure of any online
cpu. This was done with using smp_processor_id() as in index while in
preemtible context.
This means the cpu could be offline and the data be gone when it would
be accessed.
Better use any online cpu address and protect the data by get_online_cpus()
and put_online_cpus().

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

No differences found