lkml.org 
[lkml]   [2023]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [syzbot] [PATCH] Test oob in squashfs readahead
From
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: [PATCH] Test oob in squashfs readahead
Author: eadavis@qq.com

please test squashfs readahead oob

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 13d88ac54ddd

diff --git a/fs/squashfs/file.c b/fs/squashfs/file.c
index 8ba8c4c50770..cb3753782d85 100644
--- a/fs/squashfs/file.c
+++ b/fs/squashfs/file.c
@@ -566,6 +566,8 @@ static void squashfs_readahead(struct readahead_control *ractl)

max_pages = (expected + PAGE_SIZE - 1) >> PAGE_SHIFT;

+ if (!max_pages)
+ break;
nr_pages = __readahead_batch(ractl, pages, max_pages);
if (!nr_pages)
break;
\
 
 \ /
  Last update: 2023-11-20 13:58    [W:0.144 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site