[PATCH] perf bench: Fix NULL pointer dereference in "perf bench all"

2014-03-12 Thread Patrick Palka
dereference when running "perf bench all". Signed-off-by: Patrick Palka --- tools/perf/builtin-bench.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c index e47f90c..8a987d2 100644 --- a/tools/perf/builtin-bench.c +

Re: [PATCH] perf bench: Fix NULL pointer dereference in "perf bench all"

2014-03-13 Thread Patrick Palka
On Thu, Mar 13, 2014 at 10:34 AM, Arnaldo Carvalho de Melo wrote: > Em Wed, Mar 12, 2014 at 06:40:51PM -0400, Patrick Palka escreveu: >> for_each_bench() must check that the "benchmarks" field of a collection >> is not NULL before dereferencing it because the "all&qu

Re: [PATCH v2] drivers: cpufreq: Mark function as static in cpufreq.c

2014-03-02 Thread Patrick Palka
On Thu, Feb 27, 2014 at 12:25 AM, Viresh Kumar wrote: > Hi Rashika, > > On 26 February 2014 22:08, Rashika Kheria wrote: >> Mark function as static in cpufreq.c because it is not >> used outside this file. >> >> This eliminates the following warning in cpufreq.c: >> drivers/cpufreq/cpufreq.c:355:

[PATCH] ext4: address a benign compiler warning

2014-02-12 Thread Patrick Palka
-body] mb_debug(1, "mballoc: %u PAs left\n", count); Signed-off-by: Patrick Palka --- fs/ext4/mballoc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index 08481ee..92eeb98 100644 --- a/fs/ext4/mballoc.h +++ b/fs/ext4

Re: [PATCH] ext4: address a benign compiler warning

2014-02-12 Thread Patrick Palka
On Wed, Feb 12, 2014 at 9:59 PM, Joe Perches wrote: > On Wed, 2014-02-12 at 21:13 -0500, Patrick Palka wrote: >> When !defined(CONFIG_EXT4_DEBUG), mb_debug() should be defined as an >> empty do-while statement so as to suppress the following compiler >> warning: > >

[PATCH] ext4: address a benign compiler warning

2014-02-12 Thread Patrick Palka
an ‘if’ statement [-Wempty-body] mb_debug(1, "mballoc: %u PAs left\n", count); Signed-off-by: Patrick Palka --- fs/ext4/mballoc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index 08481ee..9347328 100644 --- a/fs/ext4

Re: #pragma once?

2014-01-12 Thread Patrick Palka
On Mon, Jan 6, 2014 at 3:47 PM, Josh Triplett wrote: > Does anyone have any objection to the use of "#pragma once" instead of > the usual #ifndef-#define-...-#endif include guard? GCC, LLVM/clang, > and the latest Sparse all support either method just fine. (I added > support to Sparse myself.)

Re: [PATCH] time: Fix signedness bug in sysfs_get_uname() and its callers

2013-10-18 Thread Patrick Palka
On Fri, Oct 18, 2013 at 8:16 PM, John Stultz wrote: > On 10/11/2013 10:11 AM, Patrick Palka wrote: >> sysfs_get_uname() is erroneously declared as returning size_t even >> though it may return a negative value, specifically -EINVAL. Its >> callers then check whether its retu

[PATCH] time: Fix signedness bug in sysfs_get_uname() and its callers

2013-10-11 Thread Patrick Palka
and makes sure its callers use ssize_t accordingly. Signed-off-by: Patrick Palka --- kernel/time/clockevents.c | 2 +- kernel/time/clocksource.c | 6 +++--- kernel/time/tick-internal.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/time/clockevents.c b/kernel

Re: [PATCH -tip 1/4] perf/probe: Improve error message for unknown member of data structure

2014-06-21 Thread Patrick Palka
On Fri, Jun 6, 2014 at 3:13 AM, Masami Hiramatsu wrote: > Improve the error message if we can not find given member in > the given structure. Currently perf probe shows a wrong error > message as below. > > - > # perf probe getname_flags:65 "result->BOGUS" > result(type:filename) has no

Requesting help in understanding commit 7cccd8, i.e. disabling preemption in slub.c:slab_alloc_node

2014-07-24 Thread Patrick Palka
Hi everybody, I am trying to figure out the race condition that commit 7cccd8 fixes. The commit disables preemption in between the retrieval of the per-cpu slab and the subsequent read of the slab's tid. According to the commit message, this change helps avoid allocating from the wrong node in sla

[PATCH] perf/ui/tui: don't force a refresh during progress update

2013-10-23 Thread Patrick Palka
data and pressing 'q' immediately.) Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Signed-off-by: Patrick Palka --- tools/perf/ui/tui/progress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/ui/tui/progress.c b/tools/perf/ui/tui/progress.c index

[PATCH] perf: Fix library detection when building without libelf

2013-10-23 Thread Patrick Palka
n building without libelf support. Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Signed-off-by: Patrick Palka --- tools/perf/Makefile| 2 -- tools/perf/config/Makefile | 4 2 files changed, 4 insertions(+), 2 deletions(-) diff --g

Re: [PATCH] perf: Fix library detection when building without libelf

2013-10-24 Thread Patrick Palka
On Thu, Oct 24, 2013 at 4:13 PM, Arnaldo Carvalho de Melo wrote: > Em Wed, Oct 23, 2013 at 10:51:09PM -0400, Patrick Palka escreveu: >> When I attempt to build perf on a system with slang but without libelf, >> 'make' would wrongly complain that the slang library cou

[PATCH rebase] perf/ui/tui: don't force a refresh during progress update

2013-10-25 Thread Patrick Palka
sing 'q' immediately.) Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo Cc: Namhyung Kim Cc: Ingo Molnar Acked-by: Ingo Molnar Signed-off-by: Patrick Palka --- Rebased against git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git perf/core And also

[PATCH] Fix faulty logic in the case of recursive printk

2014-08-24 Thread Patrick Palka
on error. This patch also performs a couple of local micro-optimizations (use unlikely() and ARRAY_SIZE()). Signed-off-by: Patrick Palka --- kernel/printk/printk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index e

[PATCH] Fix faulty logic in the case of recursive printk

2014-08-26 Thread Patrick Palka
= vscnprintf(text, ...); into text_len += vscnprintf(text + text_len, ...); To fix this, this patch avoids setting text_len when logging the printk recursion error. This patch also marks unlikely() the branch leading up to this code. Signed-off-by: Patrick Palka --- kernel/printk/printk.c

[PATCH] ring-buffer: use atomic_[set|clear]_mask in place of a cmpxchg loop

2014-10-15 Thread Patrick Palka
Instead of open-coding the equivalent cmpxchg loop we can just use atomic_set_mask and atomic_clear_mask to atomically OR or AND the value in &buffer->record_disabled. Cc: Steven Rostedt Cc: Ingo Molnar Signed-off-by: Patrick Palka --- NB: I have only tested this patch on x86_64 by

Re: [PATCH] ring-buffer: use atomic_[set|clear]_mask in place of a cmpxchg loop

2014-10-15 Thread Patrick Palka
On Wed, Oct 15, 2014 at 9:41 AM, Patrick Palka wrote: > Instead of open-coding the equivalent cmpxchg loop we can just use > atomic_set_mask and atomic_clear_mask to atomically OR or AND > the value in &buffer->record_disabled. > > Cc: Steven Rostedt > Cc: Ingo Molnar

Re: [PATCH] ring-buffer: use atomic_[set|clear]_mask in place of a cmpxchg loop

2014-10-15 Thread Patrick Palka
On Wed, Oct 15, 2014 at 3:08 PM, Patrick Palka wrote: > On Wed, Oct 15, 2014 at 9:41 AM, Patrick Palka wrote: >> Instead of open-coding the equivalent cmpxchg loop we can just use >> atomic_set_mask and atomic_clear_mask to atomically OR or AND >> the value in &buffer-&

[PATCH] Fix the x86 specializations of atomic_[set|clear]_mask

2014-10-15 Thread Patrick Palka
...@kernel.org Cc: Peter Zijlstra Cc: Hans-Christian Egtvedt Cc: "Paul E. McKenney" Cc: Pranith Kumar Signed-off-by: Patrick Palka --- arch/x86/include/asm/atomic.h | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/atomic.

Re: [PATCH] Fix the x86 specializations of atomic_[set|clear]_mask

2014-10-16 Thread Patrick Palka
On Thu, Oct 16, 2014 at 4:24 PM, Peter Zijlstra wrote: > On Thu, Oct 16, 2014 at 12:49:43PM -0400, Patrick Palka wrote: >> On Oct 16, 2014 4:02 AM, "Peter Zijlstra" wrote: >> > >> > On Wed, Oct 15, 2014 at 04:38:01PM -0400, Patrick Palka wrote: >> &

[tip:perf/urgent] perf bench: Fix NULL pointer dereference in " perf bench all"

2014-03-18 Thread tip-bot for Patrick Palka
Commit-ID: 6eeefccdcfc2cc9697562e740bfe6c35fddd4e1c Gitweb: http://git.kernel.org/tip/6eeefccdcfc2cc9697562e740bfe6c35fddd4e1c Author: Patrick Palka AuthorDate: Wed, 12 Mar 2014 18:40:51 -0400 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 14 Mar 2014 13:45:54 -0300 perf bench

[tip:perf/urgent] perf ui tui progress: Don' t force a refresh during progress update

2013-11-12 Thread tip-bot for Patrick Palka
Commit-ID: d53e57d039c323fe3a43630e9f729df48134e2c9 Gitweb: http://git.kernel.org/tip/d53e57d039c323fe3a43630e9f729df48134e2c9 Author: Patrick Palka AuthorDate: Fri, 25 Oct 2013 20:25:49 -0400 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 11 Nov 2013 15:56:39 -0300 perf ui tui