powerpc: Protect dl_powerpc_cpu_features on INIT_ARCH() [BZ #26615]

dl_powerpc_cpu_features also needs to be protected by __GLRO to check
for the _rtld_global_ro realocation before accessing it.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
This commit is contained in:
Raphael Moreira Zinsly 2020-09-14 11:59:24 -03:00 committed by Tulio Magno Quites Machado Filho
parent 681900d296
commit 3322ecbfe2

View File

@ -38,7 +38,7 @@
unsigned long int hwcap = __GLRO(dl_hwcap); \
unsigned long int __attribute__((unused)) hwcap2 = __GLRO(dl_hwcap2); \
bool __attribute__((unused)) use_cached_memopt = \
GLRO(dl_powerpc_cpu_features).use_cached_memopt; \
__GLRO(dl_powerpc_cpu_features.use_cached_memopt); \
if (hwcap & PPC_FEATURE_ARCH_2_06) \
hwcap |= PPC_FEATURE_ARCH_2_05 | \
PPC_FEATURE_POWER5_PLUS | \