Merge pull request #156 from yeyunfeng-dev/master
Add strlen checking for IRQBALANCE_BANNED_CPUS
This commit is contained in:
commit
9473b035ff
1 changed files with 4 additions and 2 deletions
|
@ -110,6 +110,7 @@ static void setup_banned_cpus(void)
|
|||
char buffer[4096];
|
||||
cpumask_t nohz_full;
|
||||
cpumask_t isolated_cpus;
|
||||
char *env = NULL;
|
||||
|
||||
cpus_clear(isolated_cpus);
|
||||
cpus_clear(nohz_full);
|
||||
|
@ -120,8 +121,9 @@ static void setup_banned_cpus(void)
|
|||
strlen(banned_cpumask_from_ui), banned_cpus);
|
||||
goto out;
|
||||
}
|
||||
if (getenv("IRQBALANCE_BANNED_CPUS")) {
|
||||
cpumask_parse_user(getenv("IRQBALANCE_BANNED_CPUS"), strlen(getenv("IRQBALANCE_BANNED_CPUS")), banned_cpus);
|
||||
env = getenv("IRQBALANCE_BANNED_CPUS");
|
||||
if (env && strlen(env)) {
|
||||
cpumask_parse_user(env, strlen(env), banned_cpus);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue