Messages in this thread | | | Date | Fri, 31 May 2002 15:33:51 +0200 (MET DST) | From | "Thomas 'Dent' Mirlacher" <> | Subject | Re: 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/
| |