File glibc-2.11-timer-delete-race.diff of Package glibc
From 38eb61366303c2857f1b00785757bc21da983d70 Mon Sep 17 00:00:00 2001
From: Suzuki Poulose <suzuki@in.ibm.com>
Date: Wed, 2 Sep 2009 19:58:50 -0700
Subject: [PATCH 1/1] Fix timer_create to initialize timer_t properly.
---
nptl/ChangeLog | 8 ++++++++
nptl/sysdeps/unix/sysv/linux/timer_create.c | 3 ++-
2 files changed, 10 insertions(+), 1 deletions(-)
2009-09-02 Suzuki K P <suzuki@in.ibm.com>
Joseph Myers <joseph@codesourcery.com>
[BZ #7094]
* sysdeps/unix/sysv/linux/timer_create.c (timer_create):
Initialize the sigev_notify field for newly created timer to make sure
the timer gets deleted from the active timer's list upon timer_delete.
diff --git a/nptl/sysdeps/unix/sysv/linux/timer_create.c b/nptl/sysdeps/unix/sysv/linux/timer_create.c
index a07234d..cdf127c 100644
--- nptl/sysdeps/unix/sysv/linux/timer_create.c
+++ nptl/sysdeps/unix/sysv/linux/timer_create.c
@@ -167,6 +167,7 @@ timer_create (clock_id, evp, timerid)
/* Copy the thread parameters the user provided. */
newp->sival = evp->sigev_value;
newp->thrfunc = evp->sigev_notify_function;
+ newp->sigev_notify = SIGEV_THREAD;
/* We cannot simply copy the thread attributes since the
implementation might keep internal information for