+ mm-fix-pagecache-write-deadlocks-comment.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     mm: fix pagecache write deadlocks (comment)

has been added to the -mm tree.  Its filename is

     mm-fix-pagecache-write-deadlocks-comment.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: mm: fix pagecache write deadlocks (comment)
From: Nick Piggin <npiggin@xxxxxxx>

Comment was not entirely clear about why we must eliminate all other
possibilities.

Signed-off-by: Nick Piggin <npiggin@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 mm/filemap.c |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff -puN mm/filemap.c~mm-fix-pagecache-write-deadlocks-comment mm/filemap.c
--- a/mm/filemap.c~mm-fix-pagecache-write-deadlocks-comment
+++ a/mm/filemap.c
@@ -2155,12 +2155,19 @@ retry_noprogress:
 		if (!PageUptodate(page)) {
 			/*
 			 * If the page is not uptodate, we cannot allow a
-			 * partial commit_write, because that might expose
-			 * uninitialised data.
+			 * partial commit_write because when we unlock the
+			 * page below, someone else might bring it uptodate
+			 * and we lose our write. We cannot allow a full
+			 * commit_write, because that exposes uninitialised
+			 * data. We cannot zero the rest of the file and do
+			 * a full commit_write because that exposes transient
+			 * zeroes.
 			 *
-			 * We will enter the single-segment path below, which
-			 * should get the filesystem to bring the page
-			 * uputodate for us next time.
+			 * Abort the operation entirely with a zero length
+			 * commit_write. Retry.  We will enter the
+			 * single-segment path below, which should get the
+			 * filesystem to bring the page uputodate for us next
+			 * time.
 			 */
 			if (unlikely(copied != bytes))
 				copied = 0;
_

Patches currently in -mm which might be from npiggin@xxxxxxx are

mm-comment-mmap_sem--lock_page-lockorder.patch
mm-only-mm-debug-write-deadlocks.patch
mm-fix-pagecache-write-deadlocks.patch
mm-fix-pagecache-write-deadlocks-comment.patch
oom-dont-kill-unkillable-children-or-siblings.patch
oom-cleanup-messages.patch
oom-less-memdie.patch
mm-incorrect-vm_fault_oom-returns-from-drivers.patch
mm-add-arch_alloc_page.patch
radix-tree-rcu-lockless-readside.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux