public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: yalin wang <yalin.wang2010@gmail.com>,
	oleg@redhat.com, Paul McKenney <paulmck@linux.vnet.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	vdavydov@parallels.com
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] signal:remove duplicate code
Date: Mon, 25 May 2015 10:53:34 +0200	[thread overview]
Message-ID: <5562E30E.80308@nod.at> (raw)
In-Reply-To: <5562B7CF.5090807@gmail.com>

Am 25.05.2015 um 07:49 schrieb yalin wang:
> __dequeue_signal() is only called by dequeue_signal(), after that,
> dequeue_signal() will call recalc_sigpending(), this function will
> set or unset TIF_SIGPENDING bit, so we don't need do this in
> __dequeue_signal()
> 
> Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
> ---
>  kernel/signal.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/signal.c b/kernel/signal.c
> index 836df8d..de33281 100644
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -583,10 +583,9 @@ static int __dequeue_signal(struct sigpending *pending, sigset_t *mask,
>      if (sig) {
>          if (current->notifier) {
>              if (sigismember(current->notifier_mask, sig)) {
> -                if (!(current->notifier)(current->notifier_data)) {
> -                    clear_thread_flag(TIF_SIGPENDING);

Here be dragons.
In __dequeue_signal() we clear TIF_SIGPENDING depending
on the result of ->notifier().
Did you double check that clearing that flag goes hand in hand
with recalc_sigpending()?

Thanks,
//richard

           reply	other threads:[~2015-05-25  8:53 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <5562B7CF.5090807@gmail.com>]

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=5562E30E.80308@nod.at \
    --to=richard@nod.at \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=vdavydov@parallels.com \
    --cc=yalin.wang2010@gmail.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