lkml.org 
[lkml]   [2020]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] sched/isolation: Allow "isolcpus=" to skip unknown sub-parameters
Date
Peter Xu <peterx@redhat.com> writes:
> On Thu, Apr 02, 2020 at 10:59:29AM -0400, Peter Xu wrote:
>> - pr_warn("isolcpus: Error, unknown flag\n");
>> - return 0;
>> + /*
>> + * Skip unknown sub-parameter and validate that it is not
>> + * containing an invalid character.
>> + */
>> + for (par = str, len = 0; *str && *str != ','; str++, len++)

lacks {


>> + if (!isalpha(*str))
>> + illegal = true;

lacks }

>> +
>> + if (illegal) {
>> + pr_warn("isolcpus: Invalid flag %.*s\n", len, par);
>> + return 0;
>> + }
>> +
>> + pr_info("isolcpus: Skipped unknown flag %.*s\n", len, par);
>> + str++;
>> }
>
> I just noticed this is still problematic if we want to mark this as
> stable, because "managed_irq" violate the "isalpha()" rule already...
> It means even if we apply this patch to the stable trees it'll still
> think managed_irq as illegal and ignore the whole isolcpus=.

if (!isalpha(*str) && *str != '_')

which is what I told you a couple of days ago already.

Thanks,

tglx

\
 
 \ /
  Last update: 2020-04-03 22:27    [W:0.569 / U:1.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site