Re: [PATCH] x86/resctrl: fix an imbalance in domain_remove_cpu

From: Reinette Chatre
Date: Tue Dec 10 2019 - 15:15:08 EST

Hi Qian,

On 12/10/2019 11:08 AM, Qian Cai wrote:
>> On Dec 10, 2019, at 1:44 PM, Reinette Chatre <reinette.chatre@xxxxxxxxx> wrote:
>> "A system that supports resource monitoring may have multiple resources
>> while not all of these resources are capable of monitoring. Monitoring
>> related state is initialized only for resources that are capable of
>> monitoring and correspondingly this state should subsequently only be
>> removed from these resources that are capable of monitoring.
>> domain_add_cpu() calls domain_setup_mon_state() only when r->mon_capable
>> is true where it will initialize d->mbm_over. However,
>> domain_remove_cpu() calls cancel_delayed_work(&d->mbm_over) without
>> checking r->mon_capable resulting in an attempt to cancel d->mbm_over on
>> all resources, even those that never initialized d->mbm_over because
>> they are not capable of monitoring. Hence, it triggers a debugobjects
>> warning when offlining CPUs because those timer debugobjects are never
>> initialized.
>> ODEBUG:..."
> Looks better to me. Do you want me to send a v2 for it or you could update it for merging?

Could you please send v2? I am not the one that provides final approval
for inclusion nor the one that will take care of merging afterwards.

Thank you very much