[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071208183801.GA9943@tv-sign.ru>
Date: Sat, 8 Dec 2007 21:38:01 +0300
From: Oleg Nesterov <oleg@...sign.ru>
To: Andrew Morton <akpm@...ux-foundation.org>,
Davide Libenzi <davidel@...ilserver.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Ingo Molnar <mingo@...e.hu>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Roland McGrath <roland@...hat.com>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] ptrace_stop: remove the wrong ->group_stop_count bookkeeping
ptrace_stop() decrements ->group_stop_count to "participate" in group stop.
This looks very wrong to me, the task can in fact decrement this counter twice.
If the tracee returns to the user-space before other threads complete the group
stop, it will notice TIF_SIGPENDING and do it again.
Another problem is that we don't set SIGNAL_STOP_STOPPED if the counter becomes
zero.
I must admit, I don't undestand the reason why this code was added, it is very
old.
Signed-off-by: Oleg Nesterov <oleg@...sign.ru>
--- PT/kernel/signal.c~5_ptrace_stop 2007-12-08 16:46:37.000000000 +0300
+++ PT/kernel/signal.c 2007-12-08 16:47:53.000000000 +0300
@@ -1579,13 +1579,6 @@ static inline int may_ptrace_stop(void)
*/
static void ptrace_stop(int exit_code, int clear_code, siginfo_t *info)
{
- /*
- * If there is a group stop in progress,
- * we must participate in the bookkeeping.
- */
- if (current->signal->group_stop_count > 0)
- --current->signal->group_stop_count;
-
current->last_siginfo = info;
current->exit_code = exit_code;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists