[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFwhqs0SWEDRFdBGLSsjt2i4upc9PJy67CktsB6mTjEu5g@mail.gmail.com>
Date: Fri, 20 Feb 2015 14:26:20 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Andrew Morton <akpm@...ux-foundation.org>,
John Stultz <john.stultz@...aro.org>
Subject: Re: [GIT PULL] time/ntp fix
On Fri, Feb 20, 2015 at 5:44 AM, Ingo Molnar <mingo@...nel.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
--
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