As HK_TYPE_MISC cpumask is going to be changeable at run time, use RCU to protect access to the cpumask.
Signed-off-by: Waiman Long <[email protected]> --- drivers/hwmon/coretemp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 6a0d94711ead..0284ea6a3b79 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -563,8 +563,10 @@ static int create_core_data(struct platform_device *pdev, unsigned int cpu, u32 eax, edx; int err; - if (!housekeeping_cpu(cpu, HK_TYPE_MISC)) - return 0; + scoped_guard(rcu) { + if (!housekeeping_cpu(cpu, HK_TYPE_MISC)) + return 0; + } tdata = init_temp_data(pdata, cpu, pkg_flag); if (!tdata) -- 2.53.0

