From: Wang YanQing <udknight@gmail.com>
To: mingo@kernel.org
Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-tip-commits@vger.kernel.org, akpm@linux-foundation.org,
hpa@zytor.com, paulmck@linux.vnet.ibm.com, stable@kernel.org,
tglx@linutronix.de
Subject: [PATCH] smp:Fix use un-initialized cpumask_ipi
Date: Mon, 28 Jan 2013 11:30:47 +0800 [thread overview]
Message-ID: <20130128033047.GA3024@udknight> (raw)
c7b798525b50256c8084215a139fa40b0114bfcc
[smp: Fix SMP function call empty cpu mask race]
use the un-initialized variable cpumask_ipi when
enable CONFIG_CPUMASK_OFFSTACK.
Signed-off-by: Wang YanQing <udknight@gmail.com>
---
I am sorry for miss it, I just think it when I
was lying on the bed last night. :)
kernel/smp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/smp.c b/kernel/smp.c
index 7c56aba..a38aa18 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -57,6 +57,9 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)
if (!zalloc_cpumask_var_node(&cfd->cpumask, GFP_KERNEL,
cpu_to_node(cpu)))
return notifier_from_errno(-ENOMEM);
+ if (!zalloc_cpumask_var_node(&cfd->cpumask_ipi, GFP_KERNEL,
+ cpu_to_node(cpu)))
+ return notifier_from_errno(-ENOMEM);
break;
#ifdef CONFIG_HOTPLUG_CPU
--
1.7.11.1.116.g8228a23
reply other threads:[~2013-01-28 3:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130128033047.GA3024@udknight \
--to=udknight@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=stable@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox