Re: [BUG] get_unmapped_area() change -> non booting machine
From: Linus Torvalds
Date: Tue Feb 10 2004 - 11:28:36 EST
On Tue, 10 Feb 2004, Benjamin Herrenschmidt wrote:
> Just reverting the patch fixes it. Though, the patch do make sense in
> some cases, paulus suggested to modify the code so that for a non
> MAP_FIXED map, it still search from the passed-in address, but avoids
> the spare between the current mm->brk and TASK_UNMAPPED_BASE, thus the
> algorithm would still work for things outside of these areas.
> Commment ?
I'd rather revert it. If it has broken something, I'm nervous that random
hacking will just break more. I see the patch that fixes it, but what else
will now break? Having a magic special case for "brk" is just too damn
ugly for words.
What I find strange is that bash passed in something else than NULL as the
argument in the first place. Doing a quick trace of my bash executable
shows non-NULL hints only for MAP_FIXED mmap's. So what triggered this?
Random special cases in code are just evil, and end up biting us in the
end. Which is why I'd rather see the revert, along with more of a look at
_why_ bash does what it does for you.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/