login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
September
»
22
Re: [PATCH -mm] oprofile: BUG: using smp_processor_id() in preemptible code
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Robert Richter
Subject:
Re: [PATCH -mm] oprofile: BUG: using smp_processor_id() in preemptible code
Date: Monday, September 22, 2008 - 6:15 am
On 22.09.08 12:28:34, Ingo Molnar wrote:
quoted text
> > * Ingo Molnar <mingo@elte.hu> wrote: > > > > + local_irq_save(flags); > > > __get_cpu_var(switch_index) = 0; > > > + local_irq_restore(flags); > > > > either use __raw_get_cpu_var() if we are for sure not preemptible > > here, or fix the preemption status of this codepath. > > i've applied the patch below instead to tip/oprofile - agreed?
Acked-by: Robert Richter <robert.richter@amd.com>
quoted text
> > Ingo > > ------------> > From 45f197ade73ba95681b9803680c75352fc0a1c0a Mon Sep 17 00:00:00 2001 > From: Andrea Righi <righi.andrea@gmail.com> > Date: Sat, 20 Sep 2008 12:58:40 +0200 > Subject: [PATCH] x86, oprofile: BUG: using smp_processor_id() in preemptible code > > Add __raw access before setting per cpu variable switch_index, to avoid > the following BUG: > > [ 449.166827] BUG: using smp_processor_id() in preemptible [00000000] code: modprobe/6998 > [ 449.166848] caller is op_nmi_init+0xf0/0x2b0 [oprofile] > [ 449.166855] Pid: 6998, comm: modprobe Not tainted 2.6.27-rc5-mm1 #29 > [ 449.166860] Call Trace: > [ 449.166872] [<ffffffff80362d67>] debug_smp_processor_id+0xd7/0xe0 > [ 449.166887] [<ffffffffa00181c0>] op_nmi_init+0xf0/0x2b0 [oprofile] > [ 449.166902] [<ffffffffa0018000>] oprofile_init+0x0/0x60 [oprofile] > [ 449.166915] [<ffffffffa00180a9>] oprofile_arch_init+0x9/0x30 [oprofile] > [ 449.166928] [<ffffffffa001801e>] oprofile_init+0x1e/0x60 [oprofile] > [ 449.166937] [<ffffffff8020903b>] _stext+0x3b/0x160 > [ 449.166946] [<ffffffff80477985>] __mutex_unlock_slowpath+0xe5/0x190 > [ 449.166955] [<ffffffff80262c1a>] trace_hardirqs_on_caller+0xca/0x140 > [ 449.166965] [<ffffffff8026f7fc>] sys_init_module+0xdc/0x210 > [ 449.166972] [<ffffffff8020b7cb>] system_call_fastpath+0x16/0x1b > > Signed-off-by: Andrea Righi <righi.andrea@gmail.com> > Acked-by: Robert Richter <robert.richter@amd.com> > Signed-off-by: Ingo Molnar <mingo@elte.hu> > --- > arch/x86/oprofile/nmi_int.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c > index fb4902b..4108d02 100644 > --- a/arch/x86/oprofile/nmi_int.c > +++ b/arch/x86/oprofile/nmi_int.c > @@ -551,7 +551,7 @@ int __init op_nmi_init(struct oprofile_operations *ops) > } > > /* default values, can be overwritten by model */ > - __get_cpu_var(switch_index) = 0; > + __raw_get_cpu_var(switch_index) = 0; > ops->create_files = nmi_create_files; > ops->setup = nmi_setup; > ops->shutdown = nmi_shutdown; >
-- Advanced Micro Devices, Inc. Operating System Research Center email:
robert.richter@amd.com
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH -mm] oprofile: BUG: using smp_processor_id() in pre ...
, Andrea Righi
, (Sat Sep 20, 3:58 am)
Re: [PATCH -mm] oprofile: BUG: using smp_processor_id() in ...
, Ingo Molnar
, (Mon Sep 22, 3:25 am)
Re: [PATCH -mm] oprofile: BUG: using smp_processor_id() in ...
, Ingo Molnar
, (Mon Sep 22, 3:28 am)
Re: [PATCH -mm] oprofile: BUG: using smp_processor_id() in ...
, Robert Richter
, (Mon Sep 22, 6:15 am)
Re: [PATCH -mm] oprofile: BUG: using smp_processor_id() in ...
, Andrea Righi
, (Mon Sep 22, 8:13 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Mr. James W. Laferriere
Re: Linux 2.6.25-rc1 , syntax error near unexpected token `;'
Chuck Ebbert
Re: PCI: Unable to reserve mem region problem
Mingming Cao
Re: [RFC 1/4] Large Blocksize support for Ext2/3/4
Linus Torvalds
Linux 2.6.34-rc4
git
:
Ralf Wildenhues
[PATCH] Fix typos in the documentation
Adeodato
Bazaar's patience diff as GIT_EXTERNAL_DIFF
Johannes Schindelin
Re: [PATCH 2/4] Add functions get_relative_cwd() and is_inside_dir()
Len Brown
Re: fatal: unable to create '.git/index': File exists
Denis Bueno
Git clone error
git-commits-head
:
Linux Kernel Mailing List
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
nfsd41: sanity check client drc maxreqs
Linux Kernel Mailing List
bnx2x: Moving includes
Linux Kernel Mailing List
V4L/DVB: gspca - sonixj: Adjust minor values of sensor ov7630. - set the color ga...
openbsd-misc
:
Sevan / Venture37
Re: This is what Linus Torvalds calls openBSD crowd
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Sam Fourman Jr.
Re: Help with Altell PC6700
Siju George
This is what Linus Torvalds calls openBSD crowd
Darrin Chandler
Re: OT: Python (was Re: vi in /bin)
linux-netdev
:
Kurt Van Dijck
Re: [PATCH net-next-2.6 1/2] can: add driver for Softing card
Eric Dumazet
Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()
Jamie Lokier
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
David Miller
Re: [PATCH v2] net: typos in comments in include/linux/igmp.h
Ursula Braun
[patch 0/1] remove header_ops bug in qeth driver
Colocation donated by:
Syndicate