From: Miklos Szeredi <miklos@szeredi.hu>
To: Jens Axboe <axboe@kernel.dk>
Cc: Abhijith Das <adas@redhat.com>,
Linux-Fsdevel <linux-fsdevel@vger.kernel.org>,
linux-mm@kvack.org,
Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: why does page_cache_pipe_buf_confirm() need to check page->mapping?
Date: Thu, 19 May 2016 10:05:43 +0200 [thread overview]
Message-ID: <CAJfpegv7N7WJkRJjGS_YRDvmgStLFz-fuxkdaVFFknOFuQwKng@mail.gmail.com> (raw)
Hi Jens,
I haven't done a great deal of research into this, but checking
page->mapping in page_cache_pipe_buf_confirm() might be bogus.
If the page is truncated *after* being spliced into the pipe, why on
earth does the buffer become invalid?
This looks to be a problem for filesystems that invalidate pages
(because the the data is possibly stale) and the pipe read returns
-ENODATA even though the data is there, it's just possibly different
from what was spliced into the pipe. But I don't think that's a
reason for throwing away that buffer and definitely not a reason to
return an error.
Thanks,
Miklos
--
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>
reply other threads:[~2016-05-19 8:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJfpegv7N7WJkRJjGS_YRDvmgStLFz-fuxkdaVFFknOFuQwKng@mail.gmail.com \
--to=miklos@szeredi.hu \
--cc=adas@redhat.com \
--cc=axboe@kernel.dk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox