public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: y2038@lists.linaro.org
Cc: Baolin Wang <baolin.wang@linaro.org>,
	tglx@linutronix.de, linux-kernel@vger.kernel.org
Subject: Re: [Y2038] [PATCH v3 08/23] posix-timers:Convert to the 64bit methods for the timer_settime syscall function
Date: Tue, 12 May 2015 17:36:38 +0200	[thread overview]
Message-ID: <2196679.VURrorBePj@wuerfel> (raw)
In-Reply-To: <1431439814-28820-1-git-send-email-baolin.wang@linaro.org>

On Tuesday 12 May 2015 22:10:14 Baolin Wang wrote:
> +static int default_timer_set64(struct k_itimer *timr, int flags,
> +                              struct itimerspec64 *new_setting64,
> +                              struct itimerspec64 *old_setting64)
> +{
> +       struct k_clock *kc = clockid_to_kclock(timr->it_clock);
> +       struct itimerspec new_setting, old_setting;
> +       int ret;
> +
> +       new_setting = itimerspec64_to_itimerspec(new_setting64);
> +       old_setting = itimerspec64_to_itimerspec(old_setting64);
> +       ret = kc->timer_set(timr, flags, &new_setting, &old_setting);
> +       if (!ret && old_setting64)
> +               *old_setting64 = itimerspec_to_itimerspec64(&old_setting);
> +
> +       return ret;
> +}
> 

You check old_setting64 for a NULL pointer in the second access, but not
in the first one, which is a bug. Please also check whether the variable
is used as input, output or both.

	Arnd

      reply	other threads:[~2015-05-12 15:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 14:10 [PATCH v3 08/23] posix-timers:Convert to the 64bit methods for the timer_settime syscall function Baolin Wang
2015-05-12 15:36 ` Arnd Bergmann [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=2196679.VURrorBePj@wuerfel \
    --to=arnd@arndb.de \
    --cc=baolin.wang@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=y2038@lists.linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox