lkml.org 
[lkml]   [2009]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/9] swap_info: swap_map of chars not shorts
On Thu, 15 Oct 2009, KAMEZAWA Hiroyuki wrote:
> On Thu, 15 Oct 2009 01:53:52 +0100 (BST)
> Hugh Dickins <hugh.dickins@tiscali.co.uk> wrote:
> > @@ -1175,6 +1175,12 @@ static int try_to_unuse(unsigned int typ
> > * If that's wrong, then we should worry more about
> > * exit_mmap() and do_munmap() cases described above:
> > * we might be resetting SWAP_MAP_MAX too early here.
> > + *
> > + * Yes, that's wrong: though very unlikely, swap count 0x7ffe
> > + * could surely occur if pid_max raised from PID_MAX_DEFAULT;
>
> Just a nitpick.
>
> Hmm, logically, our MAX COUNT is 0x7e after this patch. Then, how about not
> mentioning to 0x7ffe and PID_MAX ? as..
>
> Yes, that's wrong: we now use SWAP_MAP_MAX as 0x7e, very easy to overflow.
> next patch will...

Perhaps we're reading it differently: I was there inserting a comment
on what was already said above (with no wish to change that existing
comment), then going on (immediately below) to mention how this patch
is now lowering SWAP_MAP_MAX to 0x7e, making the situation even worse,
but no worries because the next patch fixes it.

If you are seeing a nit there, I'm afraid it's one too small for my
eye! And the lifetime of this comment, in Linus's git history, will
be (I'm guessing) a fraction of a second - becoming a non-issue, it
rightly gets deleted in the next patch.

Hugh

>
> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>
> > + * and we are now lowering SWAP_MAP_MAX to 0x7e, making it
> > + * much easier to reach. But the next patch will fix that.


\
 
 \ /
  Last update: 2009-10-16 00:25    [W:0.091 / U:13.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site