Commit fa59895
shmem: minor fixes to splice-read implementation
HWPoison: my reading of folio_test_hwpoison() is that it only tests the
head page of a large folio, whereas splice_folio_into_pipe() will splice
as much of the folio as it can: so for safety we should also check the
has_hwpoisoned flag, set if any of the folio's pages are hwpoisoned.
(Perhaps that ugliness can be improved at the mm end later.)
The call to splice_zeropage_into_pipe() risked overrunning past EOF: ask
it for "part" not "len".
Link: https://lkml.kernel.org/r/32c72c9c-72a8-115f-407d-f0148f368@google.com
Fixes: bd194b1 ("shmem: Implement splice-read")
Signed-off-by: Hugh Dickins <hughd@google.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 253e5df commit fa59895
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2796 | 2796 | | |
2797 | 2797 | | |
2798 | 2798 | | |
2799 | | - | |
| 2799 | + | |
| 2800 | + | |
2800 | 2801 | | |
2801 | 2802 | | |
2802 | 2803 | | |
| |||
2805 | 2806 | | |
2806 | 2807 | | |
2807 | 2808 | | |
2808 | | - | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
2809 | 2812 | | |
2810 | 2813 | | |
2811 | 2814 | | |
| |||
2841 | 2844 | | |
2842 | 2845 | | |
2843 | 2846 | | |
2844 | | - | |
| 2847 | + | |
2845 | 2848 | | |
2846 | 2849 | | |
2847 | 2850 | | |
| |||
0 commit comments