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 <syzbot+8ce7f8308d91e6b8bbe2@syzkaller.appspotmail.com> Link: https://lkml.kernel.org/r/0000000000008f74e905f56df987@google.com Cc: Matthew Wilcox <willy@infradead.org> Cc: Nicolas Pitre <nico@fluxnic.net> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 07db5e2 commit 3e35102

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)