Thread (19 messages) 19 messages, 3 authors, 2016-08-09

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

From: Jan Kara <jack@suse.cz>
Date: 2016-07-26 14:09:30
Also in: linux-fsdevel, nvdimm

On Mon 25-07-16 15:30:59, Ross Zwisler wrote:
On Fri, Jul 22, 2016 at 02:19:40PM +0200, Jan Kara wrote:
quoted
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 use page lock to ensure this consistency). So move
update of PTE bit into dax_pfn_mkwrite().

Signed-off-by: Jan Kara <jack@suse.cz>
After applying the whole series to a v4.7 baseline I was hitting a deadlock in
my testing, and it bisected to this commit.  This deadlock happens in my QEMU
guest with generic/068, ext4 and DAX.  It reproduces 100% of the time after
this commit.

Here is the lockdep info, passed through kasan_symbolize.py:
Thanks! I've checked why I didn't see this and apparently I've run last
round of testing on the wrong branch. Drat.

I've fixed the bug you've spotted (we need to release tree_lock earlier)
but xfstests are triggering some more issues now for me so I'm debugging
those.

								Honza
-- 
Jan Kara [off-list ref]
SUSE Labs, CR

--
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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help