All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Ed Swierk <eswierk@aristanetworks.com>,
	rml@tech9.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix BUG: using smp_processor_id() in preemptible code in print_fatal_signal()
Date: Tue, 27 Jan 2009 01:41:24 +0100	[thread overview]
Message-ID: <20090127004124.GA10632@redhat.com> (raw)
In-Reply-To: <20090126233732.GA23128@elte.hu>

On 01/27, Ingo Molnar wrote:
>
> * Ed Swierk <eswierk@aristanetworks.com> wrote:
>
> > Take 2:
> >
> > With print-fatal-signals=1 on a kernel with CONFIG_PREEMPT=y, sending an
> > unexpected signal to a process causes a BUG: using smp_processor_id() in
> > preemptible code.
> >
> > get_signal_to_deliver() releases the siglock before calling
> > print_fatal_signal(), which calls show_regs(), which calls
> > smp_processor_id(), which is not supposed to be called from a
> > preemptible thread.
> >
> > Signed-off-by: Ed Swierk <eswierk@aristanetworks.com>
>
> applied to tip/core/urgent, thanks Ed!

Ed, Ingo, but isn't it better to just use raw_smp_processor_id() in
__show_regs() ? This is only debug info, the printed CPU doesn't
have the "exact" meaning.

And, without the comment, it is not easy to see why print_fatal_signal()
disables preeemption before show_regs().

Oleg.


  reply	other threads:[~2009-01-27  0:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-26 23:00 [PATCH] Fix BUG: using smp_processor_id() in preemptible code in print_fatal_signal() Ed Swierk
2009-01-26 23:15 ` Ingo Molnar
2009-01-26 23:33   ` Ed Swierk
2009-01-26 23:37     ` Ingo Molnar
2009-01-27  0:41       ` Oleg Nesterov [this message]
2009-01-27  1:34         ` Ed Swierk
2009-01-27  3:02           ` Oleg Nesterov
2009-01-27 12:46             ` Ingo Molnar

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=20090127004124.GA10632@redhat.com \
    --to=oleg@redhat.com \
    --cc=eswierk@aristanetworks.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rml@tech9.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.