[PATCH 19/20] dax: Protect PTE modification on WP fault by radix tree entry lock

2016-11-18 Thread Jan Kara
Currently PTE gets updated in wp_pfn_shared() after dax_pfn_mkwrite() has released corresponding radix tree entry lock. When we want to writeprotect PTE on cache flush, we need PTE modification to happen under radix tree entry lock to ensure consistent updates of PTE and radix tree (standard

[PATCH 19/20] dax: Protect PTE modification on WP fault by radix tree entry lock

2016-11-01 Thread Jan Kara
Currently PTE gets updated in wp_pfn_shared() after dax_pfn_mkwrite() has released corresponding radix tree entry lock. When we want to writeprotect PTE on cache flush, we need PTE modification to happen under radix tree entry lock to ensure consisten updates of PTE and radix tree (standard faults

Re: [PATCH 19/20] dax: Protect PTE modification on WP fault by radix tree entry lock

2016-10-19 Thread Ross Zwisler
On Wed, Oct 19, 2016 at 09:25:05AM +0200, Jan Kara wrote: > On Tue 18-10-16 13:53:32, Ross Zwisler wrote: > > On Tue, Sep 27, 2016 at 06:08:23PM +0200, Jan Kara wrote: > > > - void *entry; > > > + void *entry, **slot; > > > pgoff_t index = vmf->pgoff; > > > > > > spin_lock_irq(>tree_lock); >

Re: [PATCH 19/20] dax: Protect PTE modification on WP fault by radix tree entry lock

2016-10-19 Thread Jan Kara
On Tue 18-10-16 13:53:32, Ross Zwisler wrote: > On Tue, Sep 27, 2016 at 06:08:23PM +0200, Jan Kara wrote: > > - void *entry; > > + void *entry, **slot; > > pgoff_t index = vmf->pgoff; > > > > spin_lock_irq(>tree_lock); > > - entry = get_unlocked_mapping_entry(mapping, index, NULL);

[PATCH 19/20] dax: Protect PTE modification on WP fault by radix tree entry lock

2016-09-27 Thread Jan Kara
Currently PTE gets updated in wp_pfn_shared() after dax_pfn_mkwrite() has released corresponding radix tree entry lock. When we want to writeprotect PTE on cache flush, we need PTE modification to happen under radix tree entry lock to ensure consisten updates of PTE and radix tree (standard faults