diff options
author | Joanne Koong <joannelkoong@gmail.com> | 2025-06-13 17:01:14 -0700 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-06-24 11:07:19 +0200 |
commit | dbee298cb7bba3aa112a0265b208f2f3861c5744 (patch) | |
tree | 64f95fe404ab6af5bda3a2941fc5c0fbcf247572 /scripts/lib/kdoc/kdoc_files.py | |
parent | cbe4134ea4bc493239786220bd69cb8a13493190 (diff) |
fuse: fix fuse_fill_write_pages() upper bound calculation
This fixes a bug in commit 63c69ad3d18a ("fuse: refactor
fuse_fill_write_pages()") where max_pages << PAGE_SHIFT is mistakenly
used as the calculation for the max_pages upper limit but there's the
possibility that copy_folio_from_iter_atomic() may copy over bytes
from the iov_iter that are less than the full length of the folio,
which would lead to exceeding max_pages.
This commit fixes it by adding a 'ap->num_folios < max_folios' check.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Link: https://lore.kernel.org/20250614000114.910380-1-joannelkoong@gmail.com
Fixes: 63c69ad3d18a ("fuse: refactor fuse_fill_write_pages()")
Tested-by: Brian Foster <bfoster@redhat.com>
Reported-by: Brian Foster <bfoster@redhat.com>
Closes: https://lore.kernel.org/linux-fsdevel/aEq4haEQScwHIWK6@bfoster/
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions