Re: [PATCH v4 05/11] perf/x86/rapl: Move cpumask variable to rapl_pmus struct

From: Dhananjay Ugwekar
Date: Thu Jul 11 2024 - 23:31:16 EST




On 7/12/2024 8:37 AM, Zhang, Rui wrote:
>> @@ -710,6 +710,9 @@ static int __init init_rapl_pmus(void)
>>         rapl_pmus = kzalloc(struct_size(rapl_pmus, rapl_pmu,
>> nr_rapl_pmu), GFP_KERNEL);
>>         if (!rapl_pmus)
>>                 return -ENOMEM;
>> +
>> +       if (!alloc_cpumask_var(&rapl_pmus->cpumask, GFP_KERNEL))
>> +               return -ENOMEM;
>
> missing free_cpumask_var() in cleanup_rapl_pmus()?

Good catch, I had it in one draft of the patch, but then it got
missed in the final one.

Will fix this

Thanks,
Dhananjay

>
> thanks,
> rui
>
>