I wouldn't classify it as a horrible hack... but.
It isn't doing the "other work" because:
1) The locking is really horrible. You have to drop/reget the VMA
and mm locks if you want to link/unlink other vmas to do the
merging.
2) For mmap() itself these other cases not being handled now happen so
rarely.
So instead of an abortion like merge_segments() which tried to be
everything to everybody, we have 4 lines of code.
The issue is mprotect() anyways. I bet we can add something which,
while not as simple as the mmap() code, is not overly complex yet will
make this glibc mprotect() case happy.
On the topic of mmap limits, it is really a job for something like
Andrey Savochkin's bean counter patches.
Later,
David S. Miller
davem@redhat.com
-
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/