From: Oleg Nesterov <oleg@redhat.com>
To: David Howells <dhowells@redhat.com>
Cc: Matt Fleming <matt@console-pimps.org>,
linux-arch@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
Matt Fleming <matt.fleming@intel.com>,
Koichi Yasutake <yasutake.koichi@jp.panasonic.com>,
Al Viro <viro@zeniv.linux.org.uk>,
linux-am33-list@redhat.com
Subject: Re: [PATCH 20/40] mn10300: Use set_current_blocked() and block_sigmask()
Date: Tue, 14 Feb 2012 19:24:27 +0100 [thread overview]
Message-ID: <20120214182427.GA25119@redhat.com> (raw)
In-Reply-To: <27258.1329243179@redhat.com>
On 02/14, David Howells wrote:
>
> Oleg Nesterov <oleg@redhat.com> wrote:
>
> > No, only current can change ->blocked. This is even documented in
> > sigprocmask(). And more, the only correct way to change ->blocked
> > is set_current_blocked(). OK, with a couple of "I know what I am
> > doing" exceptions in kernel/signal.c.
>
> I was looking at force_sig_info() and derivatives. Is that what you refer to?
Ah, sorry, forgot to mention...
force_sig_info() (and its callers) need the cleanups and fixes. It
is almost always wrong if t != current.
For example, please look at
[PATCH 1/4] signal: give SEND_SIG_FORCED more power to beat SIGNAL_UNKILLABLE
http://marc.info/?l=linux-kernel&m=132890442717122
Hopefully we can fix all ab-users soon.
Just in case... if we race with force_sig_info() the task will be
killed anyway. But I agree, this is not nice and should be fixed.
And in any case, there are other places which assume it is safe
to read current->blocked lockless.
> If so, is it worth providing a force_sig_info_current(),
> force_sigsegv_current() and force_sig_current() to make things clearer to grep
> for, I wonder?
Yes, I think the "task_struct *t" argument should die.
Oleg.
next prev parent reply other threads:[~2012-02-14 18:31 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-14 11:40 [PATCH 00/40] arch: set_current_blocked() and block_sigmask() Matt Fleming
2012-02-14 11:40 ` [PATCH 01/40] alpha: Use " Matt Fleming
2012-02-14 11:40 ` [PATCH 02/40] arm: " Matt Fleming
2012-02-14 11:40 ` Matt Fleming
2012-02-14 11:40 ` Matt Fleming
2012-02-14 11:40 ` [PATCH 03/40] avr32: Don't mask signals in the error path Matt Fleming
2012-02-14 11:40 ` [PATCH 04/40] avr32: use set_current_blocked() in handle_signal/sys_rt_sigreturn Matt Fleming
2012-02-14 11:40 ` [PATCH 05/40] avr32: Use block_sigmask() Matt Fleming
2012-02-14 11:40 ` [PATCH 06/40] blackfin: Use set_current_blocked() and block_sigmask() Matt Fleming
2012-02-16 9:28 ` Bob Liu
2012-02-14 11:40 ` [PATCH 07/40] C6X: " Matt Fleming
2012-02-14 11:40 ` [PATCH 08/40] cris: " Matt Fleming
2012-02-15 8:43 ` Jesper Nilsson
2012-02-14 11:40 ` [PATCH 09/40] frv: " Matt Fleming
2012-02-14 11:40 ` [PATCH 10/40] h8300: " Matt Fleming
2012-02-14 11:40 ` [PATCH 11/40] Hexagon: " Matt Fleming
2012-02-14 11:40 ` [PATCH 12/40] ia64: " Matt Fleming
2012-02-14 11:40 ` [PATCH 13/40] m32r: " Matt Fleming
2012-02-14 11:40 ` [PATCH 14/40] m68k: " Matt Fleming
2012-02-14 11:40 ` Matt Fleming
2012-02-14 11:40 ` Matt Fleming
2012-02-14 11:40 ` [PATCH 15/40] microblaze: Don't reimplement force_sigsegv() Matt Fleming
2012-02-14 11:40 ` [PATCH 16/40] microblaze: No need to reset handler if SA_ONESHOT Matt Fleming
2012-02-14 11:40 ` [PATCH 17/40] microblaze: Fix signal masking Matt Fleming
2012-02-14 11:40 ` [PATCH 18/40] microblaze: Use set_current_blocked() and block_sigmask() Matt Fleming
2012-02-14 11:40 ` [PATCH 19/40] MIPS: " Matt Fleming
2012-02-14 11:40 ` [PATCH 20/40] mn10300: " Matt Fleming
2012-02-14 15:56 ` David Howells
2012-02-14 17:23 ` Oleg Nesterov
2012-02-14 18:12 ` David Howells
2012-02-14 18:24 ` Oleg Nesterov [this message]
2012-02-14 17:59 ` Matt Fleming
2012-02-14 18:30 ` David Howells
2012-02-15 11:49 ` Matt Fleming
2012-02-14 11:40 ` [PATCH 21/40] OpenRISC: Don't reimplement force_sigsegv() Matt Fleming
2012-02-14 11:40 ` Matt Fleming
2012-02-15 15:40 ` Jonas Bonn
2012-02-15 15:40 ` Jonas Bonn
2012-02-15 15:40 ` Jonas Bonn
2012-02-15 15:49 ` Matt Fleming
2012-02-15 15:49 ` Matt Fleming
2012-02-15 15:57 ` Jonas Bonn
2012-02-15 15:57 ` Jonas Bonn
2012-02-15 15:57 ` Jonas Bonn
2012-02-14 11:40 ` [PATCH 22/40] OpenRISC: No need to reset handler if SA_ONESHOT Matt Fleming
2012-02-14 11:40 ` Matt Fleming
2012-02-14 11:40 ` [PATCH 23/40] OpenRISC: Don't mask signals if we fail to setup signal stack Matt Fleming
2012-02-14 11:40 ` Matt Fleming
2012-02-14 11:40 ` [PATCH 24/40] OpenRISC: Use set_current_blocked() and block_sigmask() Matt Fleming
2012-02-14 11:40 ` Matt Fleming
2012-02-14 11:40 ` [PATCH 25/40] parisc: " Matt Fleming
2012-04-06 14:59 ` Kyle McMartin
2012-02-14 11:40 ` [PATCH 26/40] powerpc: " Matt Fleming
2012-02-14 11:40 ` Matt Fleming
2012-02-14 11:41 ` [PATCH 27/40] [S390] Use block_sigmask() Matt Fleming
2012-02-14 11:41 ` [PATCH 28/40] score: Don't mask signals if we fail to setup signal stack Matt Fleming
2012-02-14 11:41 ` [PATCH 29/40] score: Use set_current_blocked() and block_sigmask() Matt Fleming
2012-02-14 11:41 ` [PATCH 30/40] sh: No need to reset handler if SA_ONESHOT Matt Fleming
2012-02-14 11:41 ` Matt Fleming
2012-02-14 11:41 ` [PATCH 31/40] sh: Use set_current_blocked() and block_sigmask() Matt Fleming
2012-02-14 11:41 ` Matt Fleming
2012-02-14 11:41 ` [PATCH 32/40] sparc: Use block_sigmask() Matt Fleming
2012-02-15 3:57 ` David Miller
2012-02-15 3:57 ` David Miller
2012-02-14 11:41 ` [PATCH 33/40] tile: Use set_current_blocked() and block_sigmask() Matt Fleming
2012-02-14 11:41 ` [PATCH 34/40] um: Don't restore current->blocked on error Matt Fleming
2012-02-14 11:41 ` [PATCH 35/40] um: Use set_current_blocked() and block_sigmask() Matt Fleming
2012-02-14 11:41 ` [PATCH 36/40] unicore32: Use block_sigmask() Matt Fleming
2012-02-14 11:41 ` [PATCH 37/40] xtensa: Don't reimplement force_sigsegv() Matt Fleming
2012-02-14 11:41 ` [PATCH 38/40] xtensa: No need to reset handler if SA_ONESHOT Matt Fleming
2012-02-14 11:41 ` [PATCH 39/40] xtensa: Don't mask signals if we fail to setup signal stack Matt Fleming
2012-02-14 11:41 ` [PATCH 40/40] xtensa: Use set_current_blocked() and block_sigmask() Matt Fleming
2012-02-14 13:45 ` [PATCH 00/40] arch: " Mark Salter
2012-02-14 13:52 ` Matt Fleming
2012-02-14 13:58 ` Mark Salter
2012-02-14 14:08 ` Matt Fleming
2012-02-14 17:32 ` Oleg Nesterov
2012-02-15 11:47 ` Matt Fleming
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=20120214182427.GA25119@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=linux-am33-list@redhat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=matt@console-pimps.org \
--cc=viro@zeniv.linux.org.uk \
--cc=yasutake.koichi@jp.panasonic.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 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.