lkml.org 
[lkml]   [1999]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Bug in mremap
From
Date
>>>>> "WG" == Wolfram Gloger <wmglo@dent.med.uni-muenchen.de> writes:

>> While preparing a patch for 2.3, I happened to notice that
>> mremap (if it moves the mapping changes the offset into whats mapped)!
>>
>> It does this with got 2.2.9 & 2.0.32.
>> - new_vma->vm_offset = vma->vm_offset + (addr - vma->vm_start);

WG> The original looks correct to me. If you remap the `complete' VMA,
WG> (addr - vma->vm_start) will be zero and the offset will remain
WG> unchanged. If however, you remap only the trailing part of a file
WG> VMA, the new offset will have to be adjusted by a positive value. Am
WG> I missing sth ?

No I was:
I was reading:
new_vma->vm_offset = vma->vm_offset + (new_addr - vma->vm_start)
Which is wrong, what is there is correct. Egg on my face!
So I retract my patch.

Eric


-
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:51    [W:0.027 / U:2.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site