mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Andrea Righi <righi.andrea@gmail.com>
Cc: robert.richter@amd.com, akpm@linux-foundation.org,
	oprofile-list@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm] oprofile: BUG: using smp_processor_id() in preemptible code
Date: Mon, 22 Sep 2008 12:25:24 +0200	[thread overview]
Message-ID: <20080922102524.GB30137@elte.hu> (raw)
In-Reply-To: <1221908320-7183-1-git-send-email-righi.andrea@gmail.com>


* Andrea Righi <righi.andrea@gmail.com> wrote:

> Add local_irq_save() / local_irq_restore() before setting per cpu 
> variable switch_index, to avoid the following BUG:

that just papers over the bug:

> +	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.

	Ingo

  reply	other threads:[~2008-09-22 10:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-20 10:58 Andrea Righi
2008-09-22 10:25 ` Ingo Molnar [this message]
2008-09-22 10:28   ` Ingo Molnar
2008-09-22 13:15     ` Robert Richter
2008-09-22 15:13     ` Andrea Righi

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=20080922102524.GB30137@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oprofile-list@lists.sourceforge.net \
    --cc=righi.andrea@gmail.com \
    --cc=robert.richter@amd.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

all inboxes | Powered by JetHome®