lkml.org 
[lkml]   [2021]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 05/23] x86/resctrl: Add domain online callback for resctrl work
From
Date
Hi Reinette,

On 15/10/2021 23:19, Reinette Chatre wrote:
> On 10/1/2021 9:02 AM, James Morse wrote:
>
>> @@ -527,21 +492,15 @@ static void domain_add_cpu(int cpu, struct rdt_resource *r)
>>           return;
>>       }
>>   -    if (r->mon_capable && domain_setup_mon_state(r, d)) {
>> -        kfree(hw_dom->ctrl_val);
>> -        kfree(hw_dom->mbps_val);
>> -        kfree(hw_dom);
>> -        return;
>> -    }
>> -
>>       list_add_tail(&d->list, add_pos);
>>   -    /*
>> -     * If resctrl is mounted, add
>> -     * per domain monitor data directories.
>> -     */
>> -    if (static_branch_unlikely(&rdt_mon_enable_key))
>> -        mkdir_mondata_subdir_allrdtgrp(r, d);
>> +    err = resctrl_online_domain(r, d);
>> +    if (err) {
>> +        list_del(&d->list);
>> +        kfree(hw_dom->ctrl_val);
>> +        kfree(hw_dom->mbps_val);
>> +        kfree(d);
>
> Even though this goes away in next patch I think this should rather be kfree(hw_dom).


Whoops, that's a rebase artefact from patch 2. Fixed.


Thanks!

James

\
 
 \ /
  Last update: 2021-10-22 20:31    [W:0.038 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site