[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected. No action required from the submitter.
The upstream commit SHA1 provided is correct: ace149e0830c380ddfce7e466fe860ca502fe4ee
WARNING: Author mismatch between patch and upstream commit: Backport author: Harshit Mogalapalliharshit.m.mogalapalli@oracle.com Commit author: Trond Myklebusttrond.myklebust@hammerspace.com
Status in newer kernel trees: 6.14.y | Present (exact SHA1) 6.13.y | Present (exact SHA1) 6.12.y | Present (exact SHA1) 6.6.y | Present (different SHA1: a2746ab3bbc9) 6.1.y | Present (different SHA1: 26530b757c81)
Note: The patch differs from the upstream commit: --- 1: ace149e0830c3 ! 1: dea76eb0a8d6e filemap: Fix bounds checking in filemap_read() @@ Metadata ## Commit message ## filemap: Fix bounds checking in filemap_read()
+ [ Upstream commit ace149e0830c380ddfce7e466fe860ca502fe4ee ] + If the caller supplies an iocb->ki_pos value that is close to the filesystem upper limit, and an iterator with a count that causes us to overflow that limit, then filemap_read() enters an infinite loop. @@ Commit message Tested-by: Mike Snitzer snitzer@kernel.org Signed-off-by: Trond Myklebust trond.myklebust@hammerspace.com Signed-off-by: Linus Torvalds torvalds@linux-foundation.org + (cherry picked from commit ace149e0830c380ddfce7e466fe860ca502fe4ee) + [Harshit: Minor conflict resolved due to missing commit: 25d6a23e8d28 + ("filemap: Convert filemap_get_read_batch() to use a folio_batch") in + 5.15.y] + Signed-off-by: Harshit Mogalapalli harshit.m.mogalapalli@oracle.com
## mm/filemap.c ## @@ mm/filemap.c: ssize_t filemap_read(struct kiocb *iocb, struct iov_iter *iter, @@ mm/filemap.c: ssize_t filemap_read(struct kiocb *iocb, struct iov_iter *iter,
- iov_iter_truncate(iter, inode->i_sb->s_maxbytes); + iov_iter_truncate(iter, inode->i_sb->s_maxbytes - iocb->ki_pos); - folio_batch_init(&fbatch); + pagevec_init(&pvec);
do { ---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.1.y | Success | Success |