[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200428225043.3091359-1-imbrenda@linux.ibm.com>
Date: Wed, 29 Apr 2020 00:50:43 +0200
From: Claudio Imbrenda <imbrenda@...ux.ibm.com>
To: akpm@...ux-foundation.org, jack@...e.cz, kirill@...temov.name
Cc: borntraeger@...ibm.com, david@...hat.com, aarcange@...hat.com,
linux-mm@...ck.org, frankja@...ux.ibm.com, sfr@...b.auug.org.au,
jhubbard@...dia.com, linux-kernel@...r.kernel.org,
linux-s390@...r.kernel.org, dave.hansen@...el.com,
peterz@...radead.org, sean.j.christopherson@...el.com
Subject: [PATCH v1 1/1] fs/splice: add missing callback for inaccessible pages
If a page is inaccesible and it is used for things like sendfile, then
the content of the page is not always touched, and can be passed
directly to a driver, causing issues.
This patch fixes the issue by adding a call to arch_make_page_accessible
in page_cache_pipe_buf_confirm; this fixes the issue.
Fixes: f28d43636d6f ("mm/gup/writeback: add callbacks for inaccessible pages")
Signed-off-by: Claudio Imbrenda <imbrenda@...ux.ibm.com>
---
fs/splice.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/splice.c b/fs/splice.c
index 4735defc46ee..f026e0ce9acd 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -106,6 +106,9 @@ static int page_cache_pipe_buf_confirm(struct pipe_inode_info *pipe,
struct page *page = buf->page;
int err;
+ if (arch_make_page_accessible(page))
+ return -EIO;
+
if (!PageUptodate(page)) {
lock_page(page);
--
2.25.4
Powered by blists - more mailing lists