Messages in this thread | | | Date | Tue, 8 Jul 2014 11:50:15 +0200 (CEST) | From | Thomas Gleixner <> | Subject | Re: [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
| |