All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: David Howells <dhowells@redhat.com>,
	Anton Altaparmakov <aia21@cam.ac.uk>,
	Andrew Morton <akpm@osdl.org>,
	torvalds@osdl.org, Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add notification of page becoming writable to VMA ops
Date: Tue, 25 Oct 2005 11:12:19 +0100	[thread overview]
Message-ID: <8619.1130235139@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0510241938100.6142@goblin.wat.veritas.com>

Hugh Dickins <hugh@veritas.com> wrote:

> > +			if (vma->vm_ops->page_mkwrite &&
> > +			    vma->vm_ops->page_mkwrite(vma, new_page) < 0)
> > +				return VM_FAULT_SIGBUS;
> > +		}
> >  	}
> 
> This isn't necessarily wrong, and may be exactly how it was before,
> I don't remember.  But it implies that when page_mkwrite fails,
> it page_cache_releases the page.  Is that desirable?  Or should
> that be left to the caller?

You're right. I've added a release. That may explain a memory leak I was
seeing that I couldn't find.

> > @@ -1945,7 +1998,7 @@ static int do_file_page(struct mm_struct
> 
> Drop all those changes to do_file_page (which I added), they're no
> longer necessary.  A case appeared which made it clear that we cannot
> rely on resolving this issue for get_user_pages in a single call to
> handle_mm_fault, and that's why the VM_FAULT_WRITE stuff got added. 

I take it then that:

 (1) the write_access parameter to do_file_page() is there purely so that
     handle_pte_fault() can jump to it rather than calling it since they have
     the same parameter set and return value;

 (2) and that do_file_page() always installs a read-only PTE so that
     do_wp_page() will be called subsequently on a write attempt.

David

  parent reply	other threads:[~2005-10-25 10:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-09 14:28 page_mkwrite seems broken Hugh Dickins
2005-10-24 15:16 ` what happened to page_mkwrite? - was: " Anton Altaparmakov
2005-10-24 15:26   ` David Howells
2005-10-24 15:43     ` Anton Altaparmakov
2005-10-24 16:01       ` Hugh Dickins
2005-10-24 19:38         ` Anton Altaparmakov
2005-10-24 20:31           ` Hugh Dickins
2005-10-24 21:18             ` Anton Altaparmakov
2005-10-24 16:23       ` [PATCH] Add notification of page becoming writable to VMA ops David Howells
2005-10-24 19:11         ` Hugh Dickins
2005-10-25  7:59           ` Anton Altaparmakov
2005-10-25  8:26             ` Hugh Dickins
2005-10-25  8:49               ` Anton Altaparmakov
2005-10-25  9:49           ` David Howells
2005-10-25  9:55           ` David Howells
2005-10-25 10:12           ` David Howells [this message]
2005-10-25 13:18           ` [PATCH] Add notification of page becoming writable to VMA ops [try #2] David Howells
2005-11-30 13:58             ` [PATCH] Add notification of page becoming writable to VMA ops [try #3] David Howells
2005-11-30 14:40               ` Miklos Szeredi
2005-11-30 14:50                 ` David Howells
2005-11-30 15:20               ` [PATCH] Add notification of page becoming writable to VMA ops [try #4] David Howells
2006-01-11 12:19                 ` [PATCH] Add notification of page becoming writable to VMA ops [try #5] David Howells
2005-10-24 15:36   ` what happened to page_mkwrite? - was: Re: page_mkwrite seems broken Hugh Dickins
2005-10-24 15:49     ` Anton Altaparmakov
  -- strict thread matches above, loose matches on Subject: below --
2006-06-20 12:59 [Ocfs2-devel] [-mm PATCH] ocfs2: Shared writeable mmap David Howells
2006-06-20  7:07 ` Peter Zijlstra
2006-06-19 23:46   ` Mark Fasheh
2006-06-20  0:07     ` Andrew Morton
2006-06-20 13:02       ` David Howells
2006-06-20 13:20         ` [PATCH] Add notification of page becoming writable to VMA ops David Howells

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=8619.1130235139@warthog.cambridge.redhat.com \
    --to=dhowells@redhat.com \
    --cc=aia21@cam.ac.uk \
    --cc=akpm@osdl.org \
    --cc=hch@infradead.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.