lkml.org 
[lkml]   [1999]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix sys_mount not to free_page(0)


On Fri, 6 Aug 1999, Kanoj Sarcar wrote:
> >
> > free_page(0) is actually supposed to work. Doesn't it?
>
> Umm, it does ... I was thinking it was happenstance, and not by design.

It's by design - I am of the religion that thinks that

free(malloc());

is always legal, even when the malloc() fails.

> Is it worthwhile to clean this up, or do other places in the code rely
> on this behavior of free_page?

There might be any number of places who just free a page, it doesn't even
slow down free_page(), because the 0 case just falls out quite naturally
from having to test for out-of-range and reserved pages anyway.

Linus


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

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