All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Thomas Gleixner <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	yinghai@kernel.org, davej@redhat.com, tglx@linutronix.de
Subject: [tip:timers/urgent] tick: Use zalloc_cpumask_var for allocating offstack cpumasks
Date: Sun, 5 May 2013 07:15:18 -0700	[thread overview]
Message-ID: <tip-642fb0f86fa38efefc0cf0e46ac20fa03e7f7f01@git.kernel.org> (raw)
In-Reply-To: <alpine.LFD.2.02.1305032015060.2990@ionos>

Commit-ID:  642fb0f86fa38efefc0cf0e46ac20fa03e7f7f01
Gitweb:     http://git.kernel.org/tip/642fb0f86fa38efefc0cf0e46ac20fa03e7f7f01
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Fri, 3 May 2013 20:22:36 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sun, 5 May 2013 16:06:35 +0200

tick: Use zalloc_cpumask_var for allocating offstack cpumasks

commit b352bc1cbc (tick: Convert broadcast cpu bitmaps to
cpumask_var_t) broke CONFIG_CPUMASK_OFFSTACK in a very subtle way.

Instead of allocating the cpumasks with zalloc_cpumask_var it uses
alloc_cpumask_var, so we can get random data there, which of course
confuses the logic completely and causes random failures.

Reported-and-tested-by: Dave Jones <davej@redhat.com>
Reported-and-tested-by: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1305032015060.2990@ionos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/time/tick-broadcast.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 61d00a8..d70cdc4 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -785,11 +785,11 @@ bool tick_broadcast_oneshot_available(void)
 
 void __init tick_broadcast_init(void)
 {
-	alloc_cpumask_var(&tick_broadcast_mask, GFP_NOWAIT);
-	alloc_cpumask_var(&tmpmask, GFP_NOWAIT);
+	zalloc_cpumask_var(&tick_broadcast_mask, GFP_NOWAIT);
+	zalloc_cpumask_var(&tmpmask, GFP_NOWAIT);
 #ifdef CONFIG_TICK_ONESHOT
-	alloc_cpumask_var(&tick_broadcast_oneshot_mask, GFP_NOWAIT);
-	alloc_cpumask_var(&tick_broadcast_pending_mask, GFP_NOWAIT);
-	alloc_cpumask_var(&tick_broadcast_force_mask, GFP_NOWAIT);
+	zalloc_cpumask_var(&tick_broadcast_oneshot_mask, GFP_NOWAIT);
+	zalloc_cpumask_var(&tick_broadcast_pending_mask, GFP_NOWAIT);
+	zalloc_cpumask_var(&tick_broadcast_force_mask, GFP_NOWAIT);
 #endif
 }

  parent reply	other threads:[~2013-05-05 14:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-30 21:20 clockevents_program_event WARN_ON preventing boot Dave Jones
2013-04-30 21:37 ` Dave Jones
2013-05-02 10:37   ` Thomas Gleixner
2013-05-02 15:46     ` Dave Jones
2013-05-02 17:56       ` Yinghai Lu
2013-05-02 19:58       ` Thomas Gleixner
2013-05-02 20:54         ` Yinghai Lu
2013-05-02 21:19           ` Thomas Gleixner
2013-05-02 21:36             ` Yinghai Lu
2013-05-02 22:49               ` Thomas Gleixner
2013-05-03 14:49                 ` Dave Jones
2013-05-03 18:32                   ` Thomas Gleixner
2013-05-03 20:10                     ` Dave Jones
2013-05-04  5:03                     ` Yinghai Lu
2013-05-05  6:21                     ` [tip:timers/urgent] tick: Use zalloc_cpumask_var for allocating offstack cpumasks tip-bot for Thomas Gleixner
2013-05-05  9:17                     ` tip-bot for Thomas Gleixner
2013-05-05 12:49                     ` tip-bot for Thomas Gleixner
2013-05-05 14:15                     ` tip-bot for Thomas Gleixner [this message]
2013-05-10 13:24                     ` clockevents_program_event WARN_ON preventing boot Josh Boyer

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=tip-642fb0f86fa38efefc0cf0e46ac20fa03e7f7f01@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=davej@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=yinghai@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.