In the Linux kernel, the following vulnerability has been resolved: ARM: 9523/1: topology: allocate the cacheinfo early on the boot CPU ARM secondary CPUs allocate cacheinfo in detect_cache_attributes(), called from secondary_start_kernel() with interrupts disabled. With PREEMPT_RT, the allocation takes a sleeping lock and triggers "BUG: sleeping function called from invalid context". Call fetch_cache_info() for each possible CPU from init_cpu_topology() on the boot CPU, following commit 5944ce092b97 ("arch_topology: Build cacheinfo from primary CPU"). This supplies the arrays before secondary CPUs populate them. Suppress -ENOENT and -EOPNOTSUPP, which leave cache detection to the existing late path. The CLIDR fallback uses the boot CPU's cache geometry. A secondary CPU with more cache leaves can still require late reallocation and trigger the warning.
https://git.kernel.org/stable/c/9d71a347dcee1652e15b8ff66e4652ae26a9a53e
https://git.kernel.org/stable/c/2d4234f99900403842b2c031fefb4c5816ac4df8
https://git.kernel.org/stable/c/2c5e9d8f59b7b3e72a3c967feea8da867f2d399a