[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070529073354.729431F8511@magilla.localdomain>
Date: Tue, 29 May 2007 00:33:54 -0700 (PDT)
From: Roland McGrath <roland@...hat.com>
To: Oleg Nesterov <oleg@...sign.ru>
Cc: Satoru Takeuchi <takeuchi_satoru.jp@...itsu.com>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org
Subject: Re: [BUG] signal: multithread program returns with wrong errno on receiving SIGSTOP
Your fix seems like the only way to go. From skimming all the ERESTART*
uses, I think that in all cases (except for n_tty.c:job_control before your
patch), TIF_SIGPENDING is indeed set when a thread returns -ERESTART*.
But it makes me realize that there is a danger of leaking a -ERESTART*
return code to userland when TIF_SIGPENDING gets cleared by another thread
doing a recalc_sigpending_tsk. Because of -ERESTART* I think we must make
it a rule that no thread can clear another thread's TIF_SIGPENDING, only
set it (unless it's known to be stopped in the signal code or something).
>From our recent work on it, I think that do_sigaction is in fact the only
place this can happen. So that says we should err in the other direction
from what I said before in do_sigaction, and not have it do recalc at all.
Thanks,
Roland
-
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