Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1403491 > unrolled thread

why does page_cache_pipe_buf_confirm() need to check page->mapping?

Started byMiklos Szeredi <miklos@szeredi.hu>
First post2016-05-19 10:10 +0200
Last post2016-05-19 10:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  why does page_cache_pipe_buf_confirm() need to check page->mapping? Miklos Szeredi <miklos@szeredi.hu> - 2016-05-19 10:10 +0200

#1403491 — why does page_cache_pipe_buf_confirm() need to check page->mapping?

FromMiklos Szeredi <miklos@szeredi.hu>
Date2016-05-19 10:10 +0200
Subjectwhy does page_cache_pipe_buf_confirm() need to check page->mapping?
Message-ID<rArbV-5AA-19@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web