diff options
author | Hugh Dickins <[email protected]> | 2023-07-23 14:05:54 -0700 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2023-07-27 13:07:03 -0700 |
commit | fa598952fac059054316dccb2213478ccb81a0d1 (patch) | |
tree | e1af0830fa7eb13a73c2688784a399704a9380a1 /lib/test_fortify/write_overflow-strscpy.c | |
parent | 253e5df8b8f0145adb090f57c6f4e6efa52d738e (diff) |
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/[email protected]
Fixes: bd194b187115 ("shmem: Implement splice-read")
Signed-off-by: Hugh Dickins <[email protected]>
Reviewed-by: David Howells <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Jens Axboe <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strscpy.c')
0 files changed, 0 insertions, 0 deletions