[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080130172646.GA2355@tv-sign.ru>
Date: Wed, 30 Jan 2008 20:26:46 +0300
From: Oleg Nesterov <oleg@...sign.ru>
To: Miklos Szeredi <mszeredi@...e.cz>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
William Lee Irwin III <wli@...omorphy.com>,
Nick Piggin <nickpiggin@...oo.com.au>,
Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
stable@...nel.org, Matt Helsley <matthltc@...ibm.com>
Subject: Re: [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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists