LKML Archive on
help / color / mirror / Atom feed
From: Hugh Dickins <>
To: Oleg Nesterov <>
Cc: Matt Helsley <>,
	Miklos Szeredi <>,
	Andrew Morton <>,
	Peter Zijlstra <>,
	William Lee Irwin III <>,
	Nick Piggin <>,
	Ingo Molnar <>,, linux-mm <>
Subject: Re: [PATCH] sys_remap_file_pages: fix ->vm_file accounting
Date: Wed, 6 Feb 2008 20:33:07 +0000 (GMT)	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Sun, 3 Feb 2008, Oleg Nesterov wrote:
> So I have to try to find another bug ;) Suppose that ->load_binary() does
> a series of do_mmap(MAP_EXECUTABLE). It is possible that mmap_region() can
> merge 2 vmas. In that case we "leak" ->num_exe_file_vmas. Unless I missed
> something, mmap_region() should do removed_exe_file_vma() when vma_merge()
> succeds (near fput(file)).

Or there's the complementary case of a VM_EXECUTABLE vma being
split in two, for example by an mprotect of a part of it.

Sorry, Matt, I don't like your patch at all.  It seems to add a fair
amount of ugliness and unmaintainablity, all for a peculiar MVFS case
(you've tried to argue other advantages, but not always convinced!).

And I found it quite hard to see where the crucial difference comes.
I guess it's that MVFS changes vma->vm_file in its ->mmap?  Well, if
MVFS does that, maybe something else does that too, but precisely to
rely on the present behaviour of /proc/pid/exe - so in fixing for
MVFS, we'd be breaking that hypothetical other?

I can understand patches to avoid mmap_sem for /proc/pid/exe, but
this one just seems too messy for too special an out-of-tree case.
(I've no last word on this, but that's my opinion.)


  reply	other threads:[~2008-02-06 20:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-30 14:20 Oleg Nesterov
2008-01-30 16:55 ` Miklos Szeredi
2008-01-30 17:26   ` Oleg Nesterov
2008-02-02 20:52     ` Matt Helsley
2008-02-02 21:17     ` Matt Helsley
2008-02-03 18:21       ` Oleg Nesterov
2008-02-06 20:33         ` Hugh Dickins [this message]
2008-02-07  0:16           ` Matt Helsley
2008-02-07 16:40             ` Hugh Dickins
2008-02-03 18:29     ` Oleg Nesterov
2008-02-06 20:13       ` Hugh Dickins
2008-02-11 10:15         ` Oleg Nesterov

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] sys_remap_file_pages: fix ->vm_file accounting' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).