From: Matt Helsley <matthltc@us.ibm.com>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Miklos Szeredi <mszeredi@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
William Lee Irwin III <wli@holomorphy.com>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org, stable@kernel.org,
linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH] sys_remap_file_pages: fix ->vm_file accounting
Date: Sat, 02 Feb 2008 12:52:38 -0800 [thread overview]
Message-ID: <1201985558.22896.12.camel@localhost.localdomain> (raw)
In-Reply-To: <20080130172646.GA2355@tv-sign.ru>
On Wed, 2008-01-30 at 20:26 +0300, Oleg Nesterov wrote:
> 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.
Only shared VMAs can be remapped by sys_remap_file_pages but all
executable mappings are MAP_PRIVATE and hence lack the shared flag. I
don't know of a way for userspace to change that flag so I think there's
nothing that needs to be done here.
Cc'ing linux-mm.
Cheers,
-Matt Helsley
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next parent reply other threads:[~2008-02-02 21:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080130142014.GA2164@tv-sign.ru>
[not found] ` <1201712101.31222.22.camel@tucsk.pomaz.szeredi.hu>
[not found] ` <20080130172646.GA2355@tv-sign.ru>
2008-02-02 20:52 ` Matt Helsley [this message]
2008-02-02 21:17 ` Matt Helsley
2008-02-03 18:21 ` Oleg Nesterov
2008-02-06 20:33 ` Hugh Dickins
2008-02-07 0:16 ` Matt Helsley
2008-02-07 16:40 ` Hugh Dickins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1201985558.22896.12.camel@localhost.localdomain \
--to=matthltc@us.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
--cc=mszeredi@suse.cz \
--cc=nickpiggin@yahoo.com.au \
--cc=oleg@tv-sign.ru \
--cc=stable@kernel.org \
--cc=wli@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox