[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m3ljcylymv.fsf@hase.home>
Date: Thu, 08 Apr 2010 18:03:52 +0200
From: Andreas Schwab <schwab@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Mike Galbraith <efault@....de>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [GIT PULL] scheduler fix
Linus Torvalds <torvalds@...ux-foundation.org> writes:
> On Thu, 8 Apr 2010, Ingo Molnar wrote:
>>
>> - if (len < nr_cpu_ids)
>> + if ((len * BITS_PER_BYTE) < nr_cpu_ids)
>> return -EINVAL;
>
> Not that it really matters, but this will now fail for no good reason if
> you pass it a half-gigabyte area due to overflow.
Which can easily be avoided.
if (len < DIV_ROUND_UP(nr_cpu_ids, BITS_PER_BYTE))
Andreas.
--
Andreas Schwab, schwab@...hat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
--
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