From: Josh Triplett <josh@freedesktop.org>
To: ego@in.ibm.com
Cc: Paul E McKenney <paulmck@us.ibm.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Oleg Nesterov <oleg@tv-sign.ru>,
Dipankar Sarma <dipankar@in.ibm.com>,
rostedt@goodmis.org
Subject: Re: [PATCH] Use raw_smp_processor_id() in rcu_random()
Date: Fri, 12 Oct 2007 02:39:16 -0700 [thread overview]
Message-ID: <470F40C4.1050901@freedesktop.org> (raw)
In-Reply-To: <20071012092044.GA1138@in.ibm.com>
Gautham R Shenoy wrote:
> With CONFIG_PREEMPT=y on 2.6.23-rc8-mm2, rcu_random() calls
> smp_processor_id() from a preemptible context, triggering the
> following kernel error.
>
> BUG: using smp_processor_id() in preemptible [00000001] code: rcu_torture_fak/5155
> caller is rcu_random+0x16/0x39 [rcutorture]
> [<c010612f>] dump_trace+0x68/0x1d2
> [<c01062b1>] show_trace_log_lvl+0x18/0x2c
> [<c0106c23>] show_trace+0xf/0x11
> [<c0106d33>] dump_stack+0x12/0x14
> [<c02a0a25>] debug_smp_processor_id+0xa1/0xb4
> [<f887064c>] rcu_random+0x16/0x39 [rcutorture]
> [<f8870cdf>] <3>BUG: using smp_processor_id() in preemptible [00000001] code: rcu_torture_fak/5156
> rcu_torture_fakewriter+0x4d/0xc5 [rcutorture]
> [<c0139b32>] caller is rcu_random+0x16/0x39 [rcutorture]
> kthread+0x38/0x5e
> [<c0105ca7>] kernel_thread_helper+0x7/0x10
> =======================
> [<c010612f>] dump_trace+0x68/0x1d2
> [<c01062b1>] show_trace_log_lvl+0x18/0x2c
> [<c0106c23>] show_trace+0xf/0x11
> [<c0106d33>] dump_stack+0x12/0x14
> [<c02a0a25>] debug_smp_processor_id+0xa1/0xb4
> [<f887064c>] rcu_random+0x16/0x39 [rcutorture]
> [<f8870cdf>] rcu_torture_fakewriter+0x4d/0xc5 [rcutorture]
>
> rcu_random() can do with raw_smp_processor_id() as a parameter to cpu_clock()
> in this particular context.
>
> Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Looks reasonable to me.
Acked-by: Josh Triplett <josh@kernel.org>
next prev parent reply other threads:[~2007-10-12 9:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-12 9:20 [PATCH] Use raw_smp_processor_id() in rcu_random() Gautham R Shenoy
2007-10-12 9:39 ` Josh Triplett [this message]
2007-10-12 19:21 ` Paul E. McKenney
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=470F40C4.1050901@freedesktop.org \
--to=josh@freedesktop.org \
--cc=akpm@linux-foundation.org \
--cc=dipankar@in.ibm.com \
--cc=ego@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@tv-sign.ru \
--cc=paulmck@us.ibm.com \
--cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox