lkml.org 
[lkml]   [2014]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] alarmtimers: verify the alarmtimer_type value from clock2alarm()
On Tue, 8 Jul 2014, Hyogi Gim wrote:

> clock2alarm() can return a minus value. so, we cannot use this
> returned value for a index of an array. but, some functions use
> this value directly as a index of an array:
> - alarm_clock_getres()
> - alarm_clock_get()
> - alarm_timer_create()
> - alarm_timer_nsleep()
>
> add the verification code for the returned alarmtimer_type from
> clock2alarm().

That's really pointless.

These functions are called from the core posix timer code if user
space requests CLOCK_REALTIME_ALARM or CLOCK_BOOTTIME_ALARM. So the
argument is already validated.

Thanks,

tglx




\
 
 \ /
  Last update: 2014-07-08 12:21    [W:0.031 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site