]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix overflow in ext4_iomap_alloc()
authorJan Kara <jack@suse.cz>
Mon, 12 Apr 2021 10:23:33 +0000 (12:23 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 17 Jun 2021 14:53:19 +0000 (10:53 -0400)
commit1f1d1dc1eb37efbb941b8980a26c5073d065d2d2
tree09cfb51d1f41cf9c30209d2bc4d0ab286fc1b9d2
parent7f6864a054c90434e53660b2e80755898468c094
ext4: fix overflow in ext4_iomap_alloc()

A code in iomap alloc may overflow block number when converting it to
byte offset. Luckily this is mostly harmless as we will just use more
expensive method of writing using unwritten extents even though we are
writing beyond i_size.

Cc: stable@kernel.org
Fixes: b5b63bfd20b2 ("ext4: introduce direct I/O write using iomap infrastructure")
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20210412102333.2676-4-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/inode.c