mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, Oleg Nesterov <oleg@tv-sign.ru>
Subject: Re: [PATCH] fix TASK_STOPPED vs TASK_NONINTERACTIVE interaction
Date: Thu, 29 Sep 2005 14:54:42 -0700 (PDT)	[thread overview]
Message-ID: <20050929215442.74EE0180E20@magilla.sf.frob.com> (raw)

I am dubious about this change.  I don't see a corresponding change to
fs/proc/array.c where it knows what all the bit values are.  I am not at
all sure there aren't other places that know these values and need a fixup
if you change them.

Any tests using < TASK_STOPPED or the like are left over from the time when
the TASK_ZOMBIE and TASK_DEAD bits were in the same word, and it served to
check for "stopped or dead".  I think this one in do_signal_stop is the
only such case.  It has been buggy ever since exit_state was separated.
Changing the bit values doesn't fix the bug that it isn't checking the
exit_state value.  This patch is probably the right fix for that, but I
have not tested it.

Signed-off-by: Roland McGrath <roland@redhat.com>

--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1775,7 +1775,8 @@ do_signal_stop(int signr)
 				 * stop is always done with the siglock held,
 				 * so this check has no races.
 				 */
-				if (t->state < TASK_STOPPED) {
+				if (!t->exit_state &&
+				    !(t->state & (TASK_STOPPED|TASK_TRACED))) {
 					stop_count++;
 					signal_wake_up(t, 0);
 				}


             reply	other threads:[~2005-09-29 21:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-29 21:54 Roland McGrath [this message]
2005-09-29 22:15 ` Linus Torvalds
2005-09-30 16:51 ` Oleg Nesterov
2005-09-30 17:18   ` Linus Torvalds
2005-10-01 11:32     ` Oleg Nesterov
2005-10-02  1:12     ` Roland McGrath
  -- strict thread matches above, loose matches on Subject: below --
2005-10-03 23:49 linux
2005-09-29 15:58 Oleg Nesterov
2005-09-29 16:02 ` Linus Torvalds
2005-09-29 16:25   ` Paulo Marques
2005-10-03  2:54   ` Coywolf Qi Hunt
2005-10-03  3:24     ` Linus Torvalds

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=20050929215442.74EE0180E20@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@tv-sign.ru \
    --cc=torvalds@osdl.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®