Re: [RESEND PATCH v4 08/15] fs/resctrl: Add interface to display supported and active kernel-mode policy

Reinette Chatre <[email protected]>
Newsgroups org.kernel.vger.linux-kernel,org.kernel.vger.linux-doc
Message-ID <[email protected]>
Hi Babu,

On 8/12/26 3:57 PM, Moger, Babu wrote:
> On 8/10/2026 10:18 PM, Reinette Chatre wrote:
>> On 7/7/26 2:50 PM, Babu Moger wrote:

...

>>> +         */
>>> +        rdtgrp = resctrl_kcfg.k_rdtgrp;
>>> +        if (!rdtgrp) {
>>> +            ret = -ENOENT;
>>> +            goto out_unlock;
>>
>> If this fails there needs to be content in last_cmd_status. Otherwise this
>> fails and then last_cmd_status reads "ok" or worse .. an old failure message.
> 
> if (WARN_ON(!rdtgrp)) {
>     rdt_last_cmd_puts("Invalid kernel mode group\n");
>     ret = -ENOENT;
>     goto out_unlock;
> }
It is not clear to me why the WARN_ON() was added. Is the resource group not being
associated with kernel mode not a legitimate scenario if the kernel mode group was
re-assigned while the reader of this file was blocked on the mutex?

Reinette
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.