* [PATCH] mm, percpu: Make sure percpu_alloc early parameter has an argument
@ 2012-11-24 21:17 Cyrill Gorcunov
2012-12-02 14:28 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Cyrill Gorcunov @ 2012-11-24 21:17 UTC (permalink / raw)
To: LKML; +Cc: Ingo Molnar, Tejun Heo
Otherwise we are getting a nil dereference
| [ 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>
---
mm/percpu.c | 3 +++
1 file changed, 3 insertions(+)
Index: linux-2.6.git/mm/percpu.c
===================================================================
--- linux-2.6.git.orig/mm/percpu.c
+++ linux-2.6.git/mm/percpu.c
@@ -1380,6 +1380,9 @@ enum pcpu_fc pcpu_chosen_fc __initdata =
static int __init percpu_alloc_setup(char *str)
{
+ if (!str)
+ return -EINVAL;
+
if (0)
/* nada */;
#ifdef CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mm, percpu: Make sure percpu_alloc early parameter has an argument
2012-11-24 21:17 [PATCH] mm, percpu: Make sure percpu_alloc early parameter has an argument Cyrill Gorcunov
@ 2012-12-02 14:28 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2012-12-02 14:28 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: LKML, Ingo Molnar
On Sun, Nov 25, 2012 at 01:17:13AM +0400, Cyrill Gorcunov wrote:
> Otherwise we are getting a nil dereference
>
> | [ 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>
Applied to percpu/for-3.8. Thanks!
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-02 14:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-24 21:17 [PATCH] mm, percpu: Make sure percpu_alloc early parameter has an argument Cyrill Gorcunov
2012-12-02 14:28 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).