All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Hyogi Gim <hyogi.gim@lge.com>
Cc: John Stultz <john.stultz@linaro.org>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] alarmtimers: verify the alarmtimer_type value from clock2alarm()
Date: Tue, 8 Jul 2014 11:50:15 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1407081148230.4357@nanos> (raw)
In-Reply-To: <1404809367-30207-1-git-send-email-hyogi.gim@lge.com>

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

 

      reply	other threads:[~2014-07-08  9:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08  8:49 [PATCH] alarmtimers: verify the alarmtimer_type value from clock2alarm() Hyogi Gim
2014-07-08  9:50 ` Thomas Gleixner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.10.1407081148230.4357@nanos \
    --to=tglx@linutronix.de \
    --cc=hyogi.gim@lge.com \
    --cc=john.stultz@linaro.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.