- posix-timers-use-sigqueue_cancelled-when-the-timer-is-destroyed.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     posix timers: use SIGQUEUE_CANCELLED when the timer is destroyed
has been removed from the -mm tree.  Its filename was
     posix-timers-use-sigqueue_cancelled-when-the-timer-is-destroyed.patch

This patch was dropped because an updated version will be merged

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: posix timers: use SIGQUEUE_CANCELLED when the timer is destroyed
From: Oleg Nesterov <oleg@xxxxxxxxxx>

This change goes as a separate patch for documentation purposes.

Suggested by Linus Torvalds.

Fixes the problem pointed out by Austin Clements.  Currently, when the
task execs it could be killed by the fatal signal sent by the posix timer,
because exec flushes the signal handlers.  See
http://bugzilla.kernel.org/show_bug.cgi?id=10460

This is a user visible change.  With this patch sys_timer_delete()
discards the pending signal which was generated by the timer.

This change goes as a separate patch for documentation purposes.  We have
many options how to set SIGQUEUE_CANCELLED while detroying the timer.  We
could set this flag in release_posix_timer() before calling
sigqueue_free(), or add the new "int cancel" argument to sigqueue_free(),
but since sigqueue_free() plays with q->flags anyway and nobody else uses
this function, this patch changes sigqueue_free() to set
SIGQUEUE_CANCELLED unconditionally.

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
Cc: Roland McGrath <roland@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/signal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN kernel/signal.c~posix-timers-use-sigqueue_cancelled-when-the-timer-is-destroyed kernel/signal.c
--- a/kernel/signal.c~posix-timers-use-sigqueue_cancelled-when-the-timer-is-destroyed
+++ a/kernel/signal.c
@@ -1246,7 +1246,7 @@ void sigqueue_free(struct sigqueue *q)
 	 * __exit_signal()->flush_sigqueue().
 	 */
 	spin_lock_irqsave(lock, flags);
-	q->flags &= ~SIGQUEUE_PREALLOC;
+	q->flags = SIGQUEUE_CANCELLED; /* clears SIGQUEUE_PREALLOC */
 	/*
 	 * If it is queued it will be freed when dequeued,
 	 * like the "regular" sigqueue.
_

Patches currently in -mm which might be from oleg@xxxxxxxxxx are

signals-fix-sigqueue_free-vs-__exit_signal-race.patch
uml-activate_mm-remove-the-dead-pf_borrowed_mm-check.patch
posix-timers-timer_delete-remove-the-bogus-it_process-=-null-check.patch
posix-timers-release_posix_timer-kill-the-bogus-put_task_struct-it_process.patch
posix-timers-use-sigqueue_cancelled-when-the-timer-is-destroyed.patch
signals-collect_signal-remove-the-unneeded-sigismember-check.patch
signals-collect_signal-simplify-the-still_pending-logic.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux