[folded-merged] filemap-kill-page_cache_read-usage-in-filemap_fault-fix-2.patch removed from -mm tree

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

 



The patch titled
     Subject: filemap: don't unlock null page in FGP_FOR_MMAP case
has been removed from the -mm tree.  Its filename was
     filemap-kill-page_cache_read-usage-in-filemap_fault-fix-2.patch

This patch was dropped because it was folded into filemap-kill-page_cache_read-usage-in-filemap_fault.patch

------------------------------------------------------
From: Josef Bacik <josef@xxxxxxxxxxxxxx>
Subject: filemap: don't unlock null page in FGP_FOR_MMAP case

We noticed a panic happening in production with the filemap fault pages
because we were unlocking a NULL page.  If add_to_page_cache() fails then
we'll have a NULL page, so fix this check to only unlock if we have a
valid page.

Link: http://lkml.kernel.org/r/20190312201742.22935-1-josef@xxxxxxxxxxxxxx
Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
Reviewed-by: Rik van Riel <riel@xxxxxxxxxx>
Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Jan Kara <jack@xxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Cc: Dave Chinner <david@xxxxxxxxxxxxx>
Cc: "Kirill A. Shutemov" <kirill@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/filemap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/filemap.c~filemap-kill-page_cache_read-usage-in-filemap_fault-fix-2
+++ a/mm/filemap.c
@@ -1663,7 +1663,7 @@ no_page:
 		 * add_to_page_cache_lru locks the page, and for mmap we expect
 		 * an unlocked page.
 		 */
-		if (fgp_flags & FGP_FOR_MMAP)
+		if (page && (fgp_flags & FGP_FOR_MMAP))
 			unlock_page(page);
 	}
 
_

Patches currently in -mm which might be from josef@xxxxxxxxxxxxxx are

filemap-kill-page_cache_read-usage-in-filemap_fault.patch
filemap-pass-vm_fault-to-the-mmap-ra-helpers.patch
filemap-drop-the-mmap_sem-for-all-blocking-operations.patch
filemap-drop-the-mmap_sem-for-all-blocking-operations-v6.patch




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

  Powered by Linux