lkml.org 
[lkml]   [2002]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: do_mmap
alan,

> On Fri, 2002-05-31 at 14:00, Thomas 'Dent' Mirlacher wrote:
> > and the checks in various places are really strange. - well some
> > places check for:
> > o != NULL
> > o > -1024UL
>
> "Not an error". Its relying as some other bits of code do actually that
> the top mappable user address is never in the top 1K of the address
> space

ok, that explain the -1024UL

> > is it possible to have 0 as a valid address? - if not, this should
> > be the return on errors.
>
> SuS explicitly says that 0 is not a valid mmap return address.

ok.

so it seems the code itself is correct. it's just a little bit odd
to read over the code, returning an unsigned int, and then find
no comments on this "not so common usage" ;)

nevertheless, functions which just check for != NULL for the return
type needs fixing. - plus s hort comment containing your explaination
above could help other people ...

tm

--
in some way i do, and in some way i don't.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.170 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site