lkml.org 
[lkml]   [2015]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [GIT PULL] time/ntp fix
From
On Fri, Feb 20, 2015 at 5:44 AM, Ingo Molnar <mingo@kernel.org> wrote:
>
> John Stultz (1):
> ntp: Fixup adjtimex freq validation on 32-bit systems

This is confusing. 32-bit?

> + /*
> + * Check for potential multiplication overflows that can
> + * only happen on 64-bit systems:

64-bit?

> + if ((txc->modes & ADJ_FREQUENCY) && (BITS_PER_LONG == 64)) {

Hmm. The code clearly says "&& (BITS_PER_LONG == 64)"

But:

> + if (LLONG_MIN / PPM_SCALE > txc->freq)
> return -EINVAL;
> - if (LONG_MAX / PPM_SCALE < txc->freq)
> + if (LLONG_MAX / PPM_SCALE < txc->freq)
> return -EINVAL;

The difference between LONG_MAX and LLONG_MAX only matters if
BITS_PER_LONG would be 32.

So the changes are confusing to begin with and the commit log
description doesn't match them anyway.

I'm not pulling this without clarifications.

Linus


\
 
 \ /
  Last update: 2015-02-20 23:41    [W:0.093 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site