public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: [for-next][PATCH 2/5] tracing/rb: Init the CPU mask on allocation
Date: Tue, 13 Dec 2016 11:14:10 -0500	[thread overview]
Message-ID: <20161213161435.889704049@goodmis.org> (raw)
In-Reply-To: 20161213161408.374215860@goodmis.org

[-- Attachment #1: 0002-tracing-rb-Init-the-CPU-mask-on-allocation.patch --]
[-- Type: text/plain, Size: 1350 bytes --]

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Before commit b32614c03413 ("tracing/rb: Convert to hotplug state
machine") the allocated cpumask was initialized to the mask of ONLINE or
POSSIBLE CPUs. After the CPU hotplug changes the buffer initialisation
moved to trace_rb_cpu_prepare() but I forgot to initially set the
cpumask to zero. This is done now.

Link: http://lkml.kernel.org/r/20161207133133.hzkcqfllxcdi3joz@linutronix.de

Fixes: b32614c03413 ("tracing/rb: Convert to hotplug state machine")
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/ring_buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index f17476f9d7f4..7edfd41d506c 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1303,7 +1303,7 @@ struct ring_buffer *__ring_buffer_alloc(unsigned long size, unsigned flags,
 	if (!buffer)
 		return NULL;
 
-	if (!alloc_cpumask_var(&buffer->cpumask, GFP_KERNEL))
+	if (!zalloc_cpumask_var(&buffer->cpumask, GFP_KERNEL))
 		goto fail_free_buffer;
 
 	nr_pages = DIV_ROUND_UP(size, BUF_PAGE_SIZE);
-- 
2.10.2

  parent reply	other threads:[~2016-12-13 16:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-13 16:14 [for-next][PATCH 0/5] tracing: Hopefully last update for merge window Steven Rostedt
2016-12-13 16:14 ` [for-next][PATCH 1/5] tracing: Use SOFTIRQ_OFFSET for softirq dectection for more accurate results Steven Rostedt
2016-12-13 16:14 ` Steven Rostedt [this message]
2016-12-13 16:14 ` [for-next][PATCH 3/5] tracing/kprobes: Add a helper method to return number of probe hits Steven Rostedt
2016-12-13 16:14 ` [for-next][PATCH 4/5] kprobes/trace: Fix kprobe selftest for newer gcc Steven Rostedt
2016-12-13 16:14 ` [for-next][PATCH 5/5] selftests: ftrace: Shift down default message verbosity Steven Rostedt
2016-12-13 16:30   ` Steven Rostedt

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=20161213161435.889704049@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    /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