From patchwork Wed Aug 10 23:43:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 3388 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 277002406F for ; Wed, 10 Aug 2011 23:43:58 +0000 (UTC) Received: from mail-qw0-f52.google.com (mail-qw0-f52.google.com [209.85.216.52]) by fiordland.canonical.com (Postfix) with ESMTP id EBCCDA1857B for ; Wed, 10 Aug 2011 23:43:57 +0000 (UTC) Received: by qwb8 with SMTP id 8so1216683qwb.11 for ; Wed, 10 Aug 2011 16:43:57 -0700 (PDT) Received: by 10.229.42.10 with SMTP id q10mr4070203qce.45.1313019837344; Wed, 10 Aug 2011 16:43:57 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.190.71 with SMTP id dh7cs97164qcb; Wed, 10 Aug 2011 16:43:57 -0700 (PDT) Received: from mr.google.com ([10.42.144.69]) by 10.42.144.69 with SMTP id a5mr10907058icv.463.1313019837095 (num_hops = 1); Wed, 10 Aug 2011 16:43:57 -0700 (PDT) Received: by 10.42.144.69 with SMTP id a5mr8786071icv.463.1313019836739; Wed, 10 Aug 2011 16:43:56 -0700 (PDT) Received: from e7.ny.us.ibm.com (e7.ny.us.ibm.com [32.97.182.137]) by mx.google.com with ESMTPS id h2si1412424pbd.58.2011.08.10.16.43.56 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Aug 2011 16:43:56 -0700 (PDT) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.137 as permitted sender) client-ip=32.97.182.137; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.137 as permitted sender) smtp.mail=jstultz@us.ibm.com Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e7.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p7ANHfEt029989; Wed, 10 Aug 2011 19:17:41 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p7ANhpP0214996; Wed, 10 Aug 2011 19:43:51 -0400 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p7AHhN4V024107; Wed, 10 Aug 2011 11:43:23 -0600 Received: from kernel.beaverton.ibm.com ([9.47.67.96]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p7AHhNKw024097; Wed, 10 Aug 2011 11:43:23 -0600 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id 18C791E750F; Wed, 10 Aug 2011 16:43:50 -0700 (PDT) From: John Stultz To: LKML Cc: John Stultz , Thomas Gleixner , stable@kernel.org Subject: [PATCH 2/3] alarmtimers: Memset itimerspec passed into alarm_timer_get Date: Wed, 10 Aug 2011 16:43:35 -0700 Message-Id: <1313019816-32519-3-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.3.2.146.gca209 In-Reply-To: <1313019816-32519-1-git-send-email-john.stultz@linaro.org> References: <1313019816-32519-1-git-send-email-john.stultz@linaro.org> Following common_timer_get, zero out the itimerspec passed in. CC: Thomas Gleixner CC: stable@kernel.org Signed-off-by: John Stultz --- kernel/time/alarmtimer.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index 1dee3f6..0e9263f 100644 --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c @@ -441,6 +441,8 @@ static int alarm_timer_create(struct k_itimer *new_timer) static void alarm_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting) { + memset(cur_setting, 0, sizeof(struct itimerspec)); + cur_setting->it_interval = ktime_to_timespec(timr->it.alarmtimer.period); cur_setting->it_value =