VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   35 Branches   59 Tags
author: Jan Kara <jack@suse.cz> 2021-04-12 12:23:33 +0200 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2021-07-14 17:06:09 +0200 commit: 1e60f8ff27bee2ff05d5f83bdd6a311a047fb7c1 parent: befdd44d46329dc8ab9459c891287cc29f2ef4bf
Commit Summary:
ext4: fix overflow in ext4_iomap_alloc()
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index fe6045a46599..211acfba3af7 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3418,7 +3418,7 @@ retry:
 	 * i_disksize out to i_size. This could be beyond where direct I/O is
 	 * happening and thus expose allocated blocks to direct I/O reads.
 	 */
-	else if ((map->m_lblk * (1 << blkbits)) >= i_size_read(inode))
+	else if (((loff_t)map->m_lblk << blkbits) >= i_size_read(inode))
 		m_flags = EXT4_GET_BLOCKS_CREATE;
 	else if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))
 		m_flags = EXT4_GET_BLOCKS_IO_CREATE_EXT;