From: Ingo Molnar <mingo@elte.hu>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>,
Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>,
Tom Zanussi <tzanussi@gmail.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH 4/4] tracing/events: fix concurrent access to ftrace_events list
Date: Wed, 6 May 2009 10:40:14 +0200 [thread overview]
Message-ID: <20090506084014.GD28675@elte.hu> (raw)
In-Reply-To: <20090506052730.GA5986@nowhere>
* Frederic Weisbecker <fweisbec@gmail.com> wrote:
> On Wed, May 06, 2009 at 10:33:45AM +0800, Li Zefan wrote:
> > A module will add/remove its trace events when it gets loaded/unloaded, so
> > the ftrace_events list is not "const", and concurrent access needs to be
> > protected.
> >
> > This patch thus fixes races between loading/unloding modules and read
> > 'available_events' or read/write 'set_event', etc.
> >
> > Below shows how to reproduce the race:
> >
> > # for ((; ;)) { cat /mnt/tracing/available_events; } > /dev/null &
> > # for ((; ;)) { insmod trace-events-sample.ko; rmmod sample; } &
> >
> > After a while:
> >
> > BUG: unable to handle kernel paging request at 0010011c
> > IP: [<c1080f27>] t_next+0x1b/0x2d
> > ...
> > Call Trace:
> > [<c10c90e6>] ? seq_read+0x217/0x30d
> > [<c10c8ecf>] ? seq_read+0x0/0x30d
> > [<c10b4c19>] ? vfs_read+0x8f/0x136
> > [<c10b4fc3>] ? sys_read+0x40/0x65
> > [<c1002a68>] ? sysenter_do_call+0x12/0x36
> >
> > [ Impact: fix races when concurrent accessing ftrace_events list ]
> >
> > Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
>
>
> Nice series of fixes!
>
> Thanks!
I've applied them to tip/tracing/events, thanks guys!
Ingo
next prev parent reply other threads:[~2009-05-06 8:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 2:32 [PATCH 1/4] tracing/events: don't say hi when loading the trace event sample Li Zefan
2009-05-06 2:32 ` [PATCH 2/4] tracing/events: make SAMPLE_TRACE_EVENTS default to n Li Zefan
2009-05-06 12:19 ` [tip:tracing/core] " tip-bot for Li Zefan
2009-05-06 2:33 ` [PATCH 3/4] tracing/events: fix memory leak when unloading module Li Zefan
2009-05-06 2:43 ` Steven Rostedt
2009-05-06 12:19 ` [tip:tracing/core] " tip-bot for Li Zefan
2009-05-06 2:33 ` [PATCH 4/4] tracing/events: fix concurrent access to ftrace_events list Li Zefan
2009-05-06 5:27 ` Frederic Weisbecker
2009-05-06 8:40 ` Ingo Molnar [this message]
2009-05-06 5:30 ` [PATCH v2] " Li Zefan
2009-05-06 12:19 ` [tip:tracing/core] " tip-bot for Li Zefan
2009-05-07 7:11 ` Li Zefan
2009-05-07 8:09 ` Ingo Molnar
2009-05-07 9:20 ` [tip:tracing/core] tracing/events: fix concurrent access to ftrace_events list, fix tip-bot for Li Zefan
2009-05-06 2:41 ` [PATCH 1/4] tracing/events: don't say hi when loading the trace event sample Steven Rostedt
2009-05-06 12:19 ` [tip:tracing/core] " tip-bot for 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=20090506084014.GD28675@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=rostedt@goodmis.org \
--cc=tzanussi@gmail.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