|
@@ -1124,7 +1124,7 @@ static void cleanup_all_thread_imc_memory(void)
|
|
static void imc_common_cpuhp_mem_free(struct imc_pmu *pmu_ptr)
|
|
static void imc_common_cpuhp_mem_free(struct imc_pmu *pmu_ptr)
|
|
{
|
|
{
|
|
if (pmu_ptr->domain == IMC_DOMAIN_NEST) {
|
|
if (pmu_ptr->domain == IMC_DOMAIN_NEST) {
|
|
- mutex_unlock(&nest_init_lock);
|
|
|
|
|
|
+ mutex_lock(&nest_init_lock);
|
|
if (nest_pmus == 1) {
|
|
if (nest_pmus == 1) {
|
|
cpuhp_remove_state(CPUHP_AP_PERF_POWERPC_NEST_IMC_ONLINE);
|
|
cpuhp_remove_state(CPUHP_AP_PERF_POWERPC_NEST_IMC_ONLINE);
|
|
kfree(nest_imc_refc);
|
|
kfree(nest_imc_refc);
|