public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>
Cc: Zhaolei <zhaolei@cn.fujitsu.com>,
	Tom Zanussi <tzanussi@gmail.com>, Li Zefan <lizf@cn.fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH][GIT-PULL] tracing/events: protect __get_str()
Date: Wed, 22 Apr 2009 01:32:54 +0200	[thread overview]
Message-ID: <20090421233253.GB6744@nowhere> (raw)
In-Reply-To: <alpine.DEB.2.00.0904211820410.9714@gandalf.stny.rr.com>

On Tue, Apr 21, 2009 at 06:21:54PM -0400, Steven Rostedt wrote:
> It would probably be better to just make the fix now. Just put the fix in 
> a separate branch to avoid race conditions (if Ingo already did a pull ;-)
> 
> -- Steve


Ok, so this new pull request includes the patches in the previous
request + your Reviewed/Acked-by + the fix on __get_str() which
I pasted below. It's also a rebase against latest tip/tracing/core.

Thanks.

The following changes since commit 3554228d4289098a8fe5cfd87512ec32a19bbe5a:
  Steven Rostedt (1):
        ring-buffer: only warn on wrap if buffer is bigger than two pages

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git tracing/core-v2

Frederic Weisbecker (3):
      tracing/events: provide string with undefined size support
      tracing/lock: provide lock_acquired event support for dynamic size string
      tracing/events: protect __get_str()

 include/trace/events/lockdep.h |    6 +-
 include/trace/ftrace.h         |   88 ++++++++++++++++++++++++++++++++++++++-
 2 files changed, 88 insertions(+), 6 deletions(-)
---
>From 94be8f865ac6887e79cd38302d707f5536e377fe Mon Sep 17 00:00:00 2001
From: Frederic Weisbecker <fweisbec@gmail.com>
Date: Wed, 22 Apr 2009 00:41:09 +0200
Subject: [PATCH] tracing/events: protect __get_str()

The __get_str() macro is used in a code part then its content should be
protected with parenthesis.

[ Impact: protect macro content ]

Reported-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
 include/trace/ftrace.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 353b7db..019cc5d 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -123,7 +123,7 @@
 #define TP_printk(fmt, args...) fmt "\n", args
 
 #undef __get_str
-#define __get_str(field)	(char *)__entry + __entry->__str_loc_##field
+#define __get_str(field)	((char *)__entry + __entry->__str_loc_##field)
 
 #undef TRACE_EVENT
 #define TRACE_EVENT(call, proto, args, tstruct, assign, print)		\
-- 
1.6.2.3



  reply	other threads:[~2009-04-21 23:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-19  5:01 [PATCH 0/2 v3] [GIT PULL] tracing/events: add the __string field Frederic Weisbecker
2009-04-19  5:01 ` [PATCH 1/2 v3] tracing/events: provide string with undefined size support Frederic Weisbecker
2009-04-19  6:15   ` Li Zefan
2009-04-19 12:35     ` Frederic Weisbecker
2009-04-21 18:16   ` Frederic Weisbecker
2009-04-21 18:33     ` Steven Rostedt
2009-04-21 21:58   ` Steven Rostedt
2009-04-21 22:00     ` Steven Rostedt
2009-04-21 22:12       ` Frederic Weisbecker
2009-04-21 22:21         ` Steven Rostedt
2009-04-21 23:32           ` Frederic Weisbecker [this message]
2009-04-22 10:25             ` [PATCH][GIT-PULL] tracing/events: protect __get_str() Ingo Molnar
2009-04-22 10:41           ` [PATCH 1/2 v3] tracing/events: provide string with undefined size support Ingo Molnar
2009-04-19  5:01 ` [PATCH 2/2 v3] tracing/lock: provide lock_acquired event support for dynamic size string Frederic Weisbecker
2009-04-21 21:59   ` Steven Rostedt
2009-04-19  6:14 ` [PATCH 0/2 v3] [GIT PULL] tracing/events: add the __string field Li Zefan
2009-04-19 12:34   ` Frederic Weisbecker
2009-04-19 13:49     ` [PATCH] tracing/core: Add current context on tracing recursion warning Frederic Weisbecker
2009-04-19 14:01       ` Ingo Molnar
2009-04-19 14:22         ` Frederic Weisbecker
2009-04-19 18:45           ` Ingo Molnar
2009-04-19 18:48             ` Frédéric Weisbecker
2009-04-19 18:47           ` Ingo Molnar
2009-04-19 17:28       ` Frederic Weisbecker
2009-04-20  0:37         ` Li Zefan

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=20090421233253.GB6744@nowhere \
    --to=fweisbec@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tzanussi@gmail.com \
    --cc=zhaolei@cn.fujitsu.com \
    /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