[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150224073548.GB16195@gmail.com>
Date: Tue, 24 Feb 2015 08:35:48 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Heinrich Schuchardt <xypron.glpk@....de>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Aaron Tomlin <atomlin@...hat.com>,
Andy Lutomirski <luto@...capital.net>,
Davidlohr Bueso <dave@...olabs.net>,
David Rientjes <rientjes@...gle.com>,
"David S. Miller" <davem@...emloft.net>,
Fabian Frederick <fabf@...net.be>,
Guenter Roeck <linux@...ck-us.net>,
"H. Peter Anvin" <hpa@...or.com>, Jens Axboe <axboe@...com>,
Joe Perches <joe@...ches.com>,
Johannes Weiner <hannes@...xchg.org>,
Kees Cook <keescook@...omium.org>,
Michael Marineau <mike@...ineau.org>,
Oleg Nesterov <oleg@...hat.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Peter Zijlstra <peterz@...radead.org>,
Prarit Bhargava <prarit@...hat.com>,
Rik van Riel <riel@...hat.com>,
Rusty Russell <rusty@...tcorp.com.au>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
Vladimir Davydov <vdavydov@...allels.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4 v4] kernel/fork.c: avoid division by zero
* Heinrich Schuchardt <xypron.glpk@....de> wrote:
> PAGE_SIZE is not guaranteed to be equal to or less than 8 times the
> THREAD_SIZE.
>
> E.g. architecture hexagon may have page size 1M and thread size 4096.
> This would lead to a division by zero in the calculation of max_threads.
>
> With 32-bit calculus there is no solution which delivers valid results
> for all possible combinations of the parameters.
> The code is only called once.
> Hence a 64-bit calculation can be used as solution.
>
> The calculation of max_threads is moved to a separate function.
Please keep the 'move to a separate function' patch in a
separate patch and don't mix it up with the fix, as I
suggested it in my previous review.
Thanks,
Ingo
--
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