[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080522215057.DCDF326FA24@magilla.localdomain>
Date: Thu, 22 May 2008 14:50:57 -0700 (PDT)
From: Roland McGrath <roland@...hat.com>
To: Oleg Nesterov <oleg@...sign.ru>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Austin Clements <amdragon+kernelbugzilla@....edu>,
Ingo Molnar <mingo@...e.hu>, john stultz <johnstul@...ibm.com>,
Michael Kerrisk <mtk.manpages@...glemail.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] signals: sigqueue_free: don't free sigqueue if it is queued
> This is not enough. Again, we remove and free sigqueue but don't discard
> the pending signal. (and we must take into account other rt signals with
> the same si_signo if we want to discard the signal).
Right, of course. The sigset_t collecting while checking the queue is the
only way to do it. Note that you need to make it:
if (q->info.si_code == SI_TIMER && sig >= SIGRTMIN)
because a SI_TIMER could be using a legacy_queue signal number. In that
case there might have been a second non-timer signal pending with that
number too, which must not get cleared. Since the only siginfo_t still
recorded is the SI_TIMER one, better to leave it queued than turn it into
an infoless signal, seems to me.
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