Skip to content

Commit 3e35102

Browse files
committed
fs/cramfs/inode.c: initialize file_ra_state
file_ra_state_init() assumes that the file_ra_state has been zeroed out. Fixes a KMSAN used-unintialized issue (at least). Fixes: cf948cb ("cramfs: read_mapping_page() is synchronous") Reported-by: syzbot <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Cc: Matthew Wilcox <[email protected]> Cc: Nicolas Pitre <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 07db5e2 commit 3e35102

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/cramfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ static void *cramfs_blkdev_read(struct super_block *sb, unsigned int offset,
183183
unsigned int len)
184184
{
185185
struct address_space *mapping = sb->s_bdev->bd_inode->i_mapping;
186-
struct file_ra_state ra;
186+
struct file_ra_state ra = {};
187187
struct page *pages[BLKS_PER_BUF];
188188
unsigned i, blocknr, buffer;
189189
unsigned long devsize;

0 commit comments

Comments
 (0)