aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/posix-timers.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/posix-timers.c')
-rw-r--r--kernel/posix-timers.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index 5fe87de10ff0..a1bf61617839 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -399,10 +399,9 @@ EXPORT_SYMBOL_GPL(register_posix_clock);
399static struct k_itimer * alloc_posix_timer(void) 399static struct k_itimer * alloc_posix_timer(void)
400{ 400{
401 struct k_itimer *tmr; 401 struct k_itimer *tmr;
402 tmr = kmem_cache_alloc(posix_timers_cache, GFP_KERNEL); 402 tmr = kmem_cache_zalloc(posix_timers_cache, GFP_KERNEL);
403 if (!tmr) 403 if (!tmr)
404 return tmr; 404 return tmr;
405 memset(tmr, 0, sizeof (struct k_itimer));
406 if (unlikely(!(tmr->sigq = sigqueue_alloc()))) { 405 if (unlikely(!(tmr->sigq = sigqueue_alloc()))) {
407 kmem_cache_free(posix_timers_cache, tmr); 406 kmem_cache_free(posix_timers_cache, tmr);
408 tmr = NULL; 407 tmr = NULL;