2.6.1-rc1 affected?
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 3 lines · Linus Torvalds
I'd actually personally prefer a stronger test than the one in 2.4.24, and my personal preference would be for just disallowing the degenerate cases entirely. I don't see a "mremap away" as being a valid thing to do, since if that is what you want, why not just do a "
munmap()"?
I belive your fix isn't correct.
Should that test be:
if(!old_len || !new_len)
goto out;
?
The difference is when old_len!=0 and new_len==0:
With the fix that Marcelo merged, mremap does nothing and returns -1. With your fix, mremap does do_munmap and then returns -1.
Michal Schmidt