lkml.org 
[lkml]   [2008]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sys_remap_file_pages: fix ->vm_file accounting
On 01/30, Miklos Szeredi wrote:
>
> On Wed, 2008-01-30 at 17:20 +0300, Oleg Nesterov wrote:
> > Fix ->vm_file accounting, mmap_region() may do do_munmap().
>
> There's a small problem with the patch: the vma itself is freed at
> unmap, so the fput(vma->vm_file) may crash. Here's an updated patch.

Ah, indeed, thanks!


Offtopic. I noticed this problem while looking at this patch:

http://marc.info/?l=linux-mm-commits&m=120141116911711

So this (the old vma could be removed before we create the new mapping)
means that the patch above has another problem: if we are remapping the
whole VM_EXECUTABLE vma, removed_exe_file_vma() can clear ->exe_file
while it shouldn't (Matt Helsley cc'ed).

Oleg.



\
 
 \ /
  Last update: 2008-01-30 18:27    [W:0.216 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site