sched/isolcpus: Output warning when the 'isolcpus=' kernel parameter is invalid
authorPrarit Bhargava <prarit@redhat.com>
Thu, 4 Feb 2016 14:38:00 +0000 (09:38 -0500)
committerIngo Molnar <mingo@kernel.org>
Fri, 5 Feb 2016 07:46:38 +0000 (08:46 +0100)
commita6e4491c682a7b28574a62e6f311a0acec50b318
tree79ea7ec2a7d06bbd4d4900eaeb9f8e4852c21936
parentb37a05c083c85c2657dca9bbe1f5d79dccf756d5
sched/isolcpus: Output warning when the 'isolcpus=' kernel parameter is invalid

The isolcpus= kernel boot parameter restricts userspace from scheduling on
the specified CPUs.

If a CPU is specified that is outside the range of 0 to nr_cpu_ids,
cpulist_parse() will return -ERANGE, return an empty cpulist, and
fail silently.

This patch adds an error message to isolated_cpu_setup() to indicate to
the user that something has gone awry, and returns 0 on error.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1454596680-10367-1-git-send-email-prarit@redhat.com
[ Twiddled some details. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c