login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
March
»
7
Re: [patch 8/6] mm: fix cpdfio vs fault race
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Nick Piggin <npiggin@...>
To: Andrew Morton <akpm@...>
Cc: <miklos@...>, Linux Memory Management List <linux-mm@...>, <linux-kernel@...>, Linus Torvalds <torvalds@...>
Subject:
Re: [patch 8/6] mm: fix cpdfio vs fault race
Date: Wednesday, March 7, 2007 - 7:37 am
On Wed, Mar 07, 2007 at 03:34:00AM -0800, Andrew Morton wrote:
quoted text
> On Wed, 7 Mar 2007 03:20:38 -0800 Andrew Morton <akpm@linux-foundation.org> wrote: > > > > > > =================================================================== > > > --- linux-2.6.orig/mm/memory.c > > > +++ linux-2.6/mm/memory.c > > > @@ -1676,6 +1676,17 @@ gotten: > > > unlock: > > > pte_unmap_unlock(page_table, ptl); > > > if (dirty_page) { > > > + /* > > > + * Yes, Virginia, this is actually required to prevent a race > > > + * with clear_page_dirty_for_io() from clearing the page dirty > > > + * bit after it clear all dirty ptes, but before a racing > > > + * do_wp_page installs a dirty pte. > > > + * > > > + * do_fault is protected similarly by holding the page lock > > > + * after the dirty pte is installed. > > > + */ > > > + lock_page(dirty_page); > > > + unlock_page(dirty_page); > > > set_page_dirty_balance(dirty_page); > > > put_page(dirty_page); > > > > Yes, I think that'll plug it. A wait_on_page_locked() should suffice. > > Or will it? Suppose after the unlock_page() a _second_ > clear_page_dirty_for_io() gets run - the same thing happens? > > Extending the lock_page() coverage around the set_page_dirty() would > prevent that. > > I guess not needed - the second clear_page_dirty_for_io() will have cleaned the > pte.
Yeah, all we need to do is keep page faults out of that little window in clear_page_dirty_for_io() where I stuck the comment. -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
Re: [patch 8/6] mm: fix cpdfio vs fault race
, Andrew Morton
, (Wed Mar 7, 7:20 am)
Re: [patch 8/6] mm: fix cpdfio vs fault race
, Andrew Morton
, (Wed Mar 7, 7:34 am)
Re: [patch 8/6] mm: fix cpdfio vs fault race
, Nick Piggin
, (Wed Mar 7, 7:37 am)
Re: [patch 8/6] mm: fix cpdfio vs fault race
, Nick Piggin
, (Wed Mar 7, 7:31 am)
Re: [patch 8/6] mm: fix cpdfio vs fault race
, Andrew Morton
, (Wed Mar 7, 5:02 pm)
Re: [patch 8/6] mm: fix cpdfio vs fault race
, Nick Piggin
, (Thu Mar 8, 1:50 am)
Re: [patch 8/6] mm: fix cpdfio vs fault race
, Linus Torvalds
, (Wed Mar 7, 5:33 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
H. Peter Anvin
Re: [rft] s2ram wakeup moves to .c, could fix few machines
Greg Kroah-Hartman
[PATCH 002/196] Chinese: rephrase English introduction in HOWTO
Ingo Molnar
[patch] PID namespace design bug, workaround
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
git
:
linux-netdev
:
Eric Dumazet
Re: Multicast packet loss
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
David Miller
[GIT]: Networking
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
12 users
and
800 guests
online.
Online users
marblecleaning
zeekec
successfuldrlg
nscalemodeltra
dfarrell356
seosoftwarertzd
aheins678
taximlihlh
lc09isg
mainetravelxzmy
cordic
hotrolledsteel
Syndicate