From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752070AbbEYIxl (ORCPT ); Mon, 25 May 2015 04:53:41 -0400 Received: from a.ns.miles-group.at ([95.130.255.143]:65275 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750852AbbEYIxk (ORCPT ); Mon, 25 May 2015 04:53:40 -0400 Message-ID: <5562E30E.80308@nod.at> Date: Mon, 25 May 2015 10:53:34 +0200 From: Richard Weinberger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: yalin wang , oleg@redhat.com, Paul McKenney , Andrew Morton , vdavydov@parallels.com CC: "linux-kernel@vger.kernel.org" Subject: Re: [RFC] signal:remove duplicate code References: <5562B7CF.5090807@gmail.com> In-Reply-To: <5562B7CF.5090807@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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