diff options
author | Cyrill Gorcunov <gorcunov@openvz.org> | 2012-11-24 16:17:13 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-12-02 09:23:04 -0500 |
commit | 5479c78ac6f688ea5ea8c49b44cf90ea87b63931 (patch) | |
tree | 449331a4649fb1dd019509d6c5a7ae71bbc05157 /mm | |
parent | b4916cb17c261a6043bcb2a98d0d6512497a7cf8 (diff) |
mm, percpu: Make sure percpu_alloc early parameter has an argument
Otherwise we are getting a nil dereference if percpu_alloc kernel boot
argument is specified without value.
| [ 0.000000] BUG: unable to handle kernel NULL pointer dereference at (null)
| [ 0.000000] IP: [<ffffffff81391360>] strcmp+0x10/0x30
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/percpu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/percpu.c b/mm/percpu.c index ec2589616e7d..8c8e08f3a692 100644 --- a/mm/percpu.c +++ b/mm/percpu.c | |||
@@ -1380,6 +1380,9 @@ enum pcpu_fc pcpu_chosen_fc __initdata = PCPU_FC_AUTO; | |||
1380 | 1380 | ||
1381 | static int __init percpu_alloc_setup(char *str) | 1381 | static int __init percpu_alloc_setup(char *str) |
1382 | { | 1382 | { |
1383 | if (!str) | ||
1384 | return -EINVAL; | ||
1385 | |||
1383 | if (0) | 1386 | if (0) |
1384 | /* nada */; | 1387 | /* nada */; |
1385 | #ifdef CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK | 1388 | #ifdef CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK |