[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2196679.VURrorBePj@wuerfel>
Date: Tue, 12 May 2015 17:36:38 +0200
From: Arnd Bergmann <arnd@...db.de>
To: y2038@...ts.linaro.org
Cc: Baolin Wang <baolin.wang@...aro.org>, tglx@...utronix.de,
linux-kernel@...r.kernel.org
Subject: Re: [Y2038] [PATCH v3 08/23] posix-timers:Convert to the 64bit methods for the timer_settime syscall function
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists