[PATCH 2/2] posix-cpu-timers: initialize new_itimer->it.cpu.firing
From: Stanislaw Gruszka
Date: Thu Sep 24 2009 - 10:35:43 EST
In case when posix_cpu_timer_create() is called from sys_timer_create()
it.cpu.firing field of struct k_itimer is uninitialized.
Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>
---
kernel/posix-cpu-timers.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index 5c9dc22..e73a386 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -398,6 +398,7 @@ int posix_cpu_timer_create(struct k_itimer *new_timer)
INIT_LIST_HEAD(&new_timer->it.cpu.entry);
new_timer->it.cpu.incr.sched = 0;
new_timer->it.cpu.expires.sched = 0;
+ new_timer->it.cpu.firing = 0;
read_lock(&tasklist_lock);
if (CPUCLOCK_PERTHREAD(new_timer->it_clock)) {
--
1.6.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/