Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sched-urgent-2020-04-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Thomas Gleixner:
"Two fixes for the scheduler:

- Work around an uninitialized variable warning where GCC can't
figure it out.

- Allow 'isolcpus=' to skip unknown subparameters so that older
kernels work with the commandline of a newer kernel. Improve the
error output while at it"

* tag 'sched-urgent-2020-04-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/vtime: Work around an unitialized variable warning
sched/isolation: Allow "isolcpus=" to skip unknown sub-parameters

+21 -4
+2 -2
kernel/sched/cputime.c
··· 1003 1003 enum cpu_usage_stat usage, int cpu) 1004 1004 { 1005 1005 u64 *cpustat = kcpustat->cpustat; 1006 + u64 val = cpustat[usage]; 1006 1007 struct rq *rq; 1007 - u64 val; 1008 1008 int err; 1009 1009 1010 1010 if (!vtime_accounting_enabled_cpu(cpu)) 1011 - return cpustat[usage]; 1011 + return val; 1012 1012 1013 1013 rq = cpu_rq(cpu); 1014 1014
+19 -2
kernel/sched/isolation.c
··· 149 149 static int __init housekeeping_isolcpus_setup(char *str) 150 150 { 151 151 unsigned int flags = 0; 152 + bool illegal = false; 153 + char *par; 154 + int len; 152 155 153 156 while (isalpha(*str)) { 154 157 if (!strncmp(str, "nohz,", 5)) { ··· 172 169 continue; 173 170 } 174 171 175 - pr_warn("isolcpus: Error, unknown flag\n"); 176 - return 0; 172 + /* 173 + * Skip unknown sub-parameter and validate that it is not 174 + * containing an invalid character. 175 + */ 176 + for (par = str, len = 0; *str && *str != ','; str++, len++) { 177 + if (!isalpha(*str) && *str != '_') 178 + illegal = true; 179 + } 180 + 181 + if (illegal) { 182 + pr_warn("isolcpus: Invalid flag %.*s\n", len, par); 183 + return 0; 184 + } 185 + 186 + pr_info("isolcpus: Skipped unknown flag %.*s\n", len, par); 187 + str++; 177 188 } 178 189 179 190 /* Default behaviour for isolcpus without flags */