mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
alarmtimers: Memset itimerspec passed into alarm_timer_get
Following common_timer_get, zero out the itimerspec passed in. CC: Thomas Gleixner <tglx@linutronix.de> CC: stable@kernel.org Signed-off-by: John Stultz <john.stultz@linaro.org>
This commit is contained in:
parent
971c90bfa2
commit
ea7802f630
@ -441,6 +441,8 @@ static int alarm_timer_create(struct k_itimer *new_timer)
|
|||||||
static void alarm_timer_get(struct k_itimer *timr,
|
static void alarm_timer_get(struct k_itimer *timr,
|
||||||
struct itimerspec *cur_setting)
|
struct itimerspec *cur_setting)
|
||||||
{
|
{
|
||||||
|
memset(cur_setting, 0, sizeof(struct itimerspec));
|
||||||
|
|
||||||
cur_setting->it_interval =
|
cur_setting->it_interval =
|
||||||
ktime_to_timespec(timr->it.alarmtimer.period);
|
ktime_to_timespec(timr->it.alarmtimer.period);
|
||||||
cur_setting->it_value =
|
cur_setting->it_value =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user