DivestOS/Patches/Linux_CVEs/CVE-2016-8463/ANY/0.patch

36 lines
1.2 KiB
Diff
Raw Normal View History

From cd0fa86de6ca1d40c0a93d86d1c0f7846e8a9a10 Mon Sep 17 00:00:00 2001
From: Laura Abbott <lauraa@codeaurora.org>
Date: Fri, 3 Jan 2014 10:47:00 -0800
Subject: fs: fuse: Add replacment for CMA pages into the LRU cache
CMA pages are currently replaced in the FUSE file system since
FUSE may hold on to CMA pages for a long time, preventing migration.
The replacement page is added to the file cache but not the LRU
cache. This may prevent the page from being properly aged and dropped,
creating poor performance under tight memory condition. Fix this by
adding the new page to the LRU cache after creation.
Change-Id: Ib349abf1024d48386b835335f3fbacae040b6241
CRs-Fixed: 586855
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
---
fs/fuse/file.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index e231a7f..3411ed8 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -822,6 +822,8 @@ static int fuse_readpages_fill(void *_data, struct page *page)
lock_page(newpage);
put_page(newpage);
+ lru_cache_add_file(newpage);
+
/* finally release the old page and swap pointers */
unlock_page(oldpage);
page_cache_release(oldpage);
--
cgit v1.1