mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Roland McGrath <roland@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Davide Libenzi <davidel@xmailserver.org>,
	Ingo Molnar <mingo@elte.hu>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Michael Kerrisk <mtk-manpages@gmx.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH 3/4] signalfd: fix interaction with posix-timers
Date: Mon, 13 Aug 2007 12:26:15 +0400	[thread overview]
Message-ID: <20070813082615.GA90@tv-sign.ru> (raw)
In-Reply-To: <20070812230350.A6F874D057D@magilla.localdomain>

On 08/12, Roland McGrath wrote:
>
> This only affects signalfd and so the core change seems ok vs status quo.
> 
> I think it would be better overall not to have anyone like signalfd calling
> dequeue_signal in its current form at all.  (The function is too much an
> internal piece of the core signals code.  The SIGNAL_STOP_DEQUEUED code
> applying for signalfd calls is probably another problem, for example.)

I agree, the "tsk != current" case is not nice. We can forbid fetching
signals from another thread group and remove it, this is very easy.
Until then, we can't avoid it without the code duplication.

But SIGNAL_STOP_DEQUEUED code should be OK, afaics. We only need it to
make sure do_signal_stop() can't miss SIGNAL_STOP_CONTINUED/GROUP_EXIT.

Can't we remove SIGNAL_STOP_DEQUEUED, btw?

	dequeue_signal:

		if (sig_kernel_stop(sig))
			->flags &= ~SIGNAL_STOP_CONTINUED;

	do_signal_stop:

		if (flags & (SIGNAL_STOP_CONTINUED | SIGNAL_GROUP_EXIT))
			return 0;

Possible?

Oleg.


  reply	other threads:[~2007-08-13 13:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-12 17:05 Oleg Nesterov
2007-08-12 23:03 ` Roland McGrath
2007-08-13  8:26   ` Oleg Nesterov [this message]
2007-08-28  4:35     ` SIGNAL_STOP_DEQUEUED Roland McGrath
2007-08-28  9:13       ` SIGNAL_STOP_DEQUEUED Oleg Nesterov
2007-09-01  7:12         ` SIGNAL_STOP_DEQUEUED Roland McGrath

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=20070813082615.GA90@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=davidel@xmailserver.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mtk-manpages@gmx.net \
    --cc=roland@redhat.com \
    --cc=stable@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®