Hou Tao
a2c2f0826e
ext4: limit the number of blocks in one ADD_RANGE TLV
...
Now EXT4_FC_TAG_ADD_RANGE uses ext4_extent to track the
newly-added blocks, but the limit on the max value of
ee_len field is ignored, and it can lead to BUG_ON as
shown below when running command "fallocate -l 128M file"
on a fast_commit-enabled fs:
kernel BUG at fs/ext4/ext4_extents.h:199!
invalid opcode: 0000 [#1 ] SMP PTI
CPU: 3 PID: 624 Comm: fallocate Not tainted 5.14.0-rc6+ #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996)
RIP: 0010:ext4_fc_write_inode_data+0x1f3/0x200
Call Trace:
? ext4_fc_write_inode+0xf2/0x150
ext4_fc_commit+0x93b/0xa00
? ext4_fallocate+0x1ad/0x10d0
ext4_sync_file+0x157/0x340
? ext4_sync_file+0x157/0x340
vfs_fsync_range+0x49/0x80
do_fsync+0x3d/0x70
__x64_sys_fsync+0x14/0x20
do_syscall_64+0x3b/0xc0
entry_SYSCALL_64_after_hwframe+0x44/0xae
Simply fixing it by limiting the number of blocks
in one EXT4_FC_TAG_ADD_RANGE TLV.
Fixes: aa75f4d3daae ("ext4: main fast-commit commit path")
Cc: stable@kernel.org
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Link: https://lore.kernel.org/r/20210820044505.474318-1-houtao1@huawei.com
2021-10-01 00:03:25 -04:00
..
2021-05-07 11:18:52 -07:00
2021-06-29 10:53:48 -07:00
2021-06-29 10:53:48 -07:00
2021-06-25 09:41:29 -07:00
2021-03-24 14:14:27 -04:00
2021-03-30 16:54:49 -07:00
2021-06-29 10:53:48 -07:00
2021-07-13 12:02:07 -07:00
2021-04-23 10:14:32 +01:00
2021-06-29 00:15:52 +02:00
2021-07-16 00:21:47 -05:00
2021-04-23 14:42:39 -07:00
2021-07-13 20:56:24 +02:00
2021-01-05 23:02:47 -05:00
2021-06-05 00:52:52 -07:00
2021-06-14 09:07:45 +02:00
2021-06-11 12:44:47 -05:00
2021-06-29 10:53:48 -07:00
2021-04-12 15:04:29 +02:00
2021-06-08 00:41:24 +08:00
2021-07-06 11:06:04 -07:00
2020-12-09 09:39:38 -05:00
2021-06-29 10:53:48 -07:00
2021-10-01 00:03:25 -04:00
2021-07-06 22:05:06 -07:00
2021-06-29 10:53:48 -07:00
2021-04-23 10:14:32 +01:00
2021-07-06 11:17:41 -07:00
2021-06-29 20:23:08 -07:00
2021-07-15 10:13:49 -07:00
2021-07-01 11:06:06 -07:00
2021-05-02 09:14:01 -07:00
2021-06-29 10:53:48 -07:00
2021-06-28 20:39:26 -07:00
2021-07-15 09:58:06 -07:00
2021-06-17 17:11:42 +02:00
2021-08-30 23:36:50 -04:00
2021-05-04 18:08:40 -07:00
2021-07-02 14:25:17 -07:00
2021-07-05 13:51:41 -07:00
2021-07-06 20:14:44 -04:00
2021-06-29 10:53:48 -07:00
2021-06-21 21:24:07 +01:00
2021-07-09 09:43:57 -07:00
2021-07-06 20:14:41 -04:00
2021-07-09 12:05:33 -07:00
2021-07-02 12:08:10 -07:00
2021-06-14 12:16:37 +02:00
2021-07-03 11:30:04 -07:00
2021-06-30 19:37:39 -07:00
2021-06-29 10:53:48 -07:00
2021-03-12 22:15:22 -05:00
2021-06-28 08:40:08 -04:00
2021-04-30 15:17:08 -07:00
2021-07-03 11:41:14 -07:00
2021-06-30 12:21:16 -07:00
2021-06-22 10:40:52 +02:00
2021-06-29 10:53:48 -07:00
2021-07-01 12:06:39 -07:00
2020-10-24 12:26:05 -07:00
2021-06-29 10:53:46 -07:00
2021-01-12 14:26:31 +01:00
2021-06-29 10:53:48 -07:00
2021-03-23 14:08:18 -04:00
2021-06-22 09:21:39 +02:00
2021-07-01 12:06:39 -07:00
2021-06-29 10:53:48 -07:00
2021-05-02 00:43:35 +09:00
2021-06-23 14:36:52 +02:00
2021-04-22 17:31:32 +10:00
2021-07-18 11:27:25 -07:00
2021-07-16 13:45:18 +09:00
2021-04-30 11:20:39 -07:00
2021-01-15 12:17:25 -05:00
2021-01-24 14:27:20 +01:00
2021-01-24 14:27:20 +01:00
2021-06-29 10:53:50 -07:00
2021-06-29 17:29:11 -07:00
2021-06-29 17:29:11 -07:00
2021-06-29 10:53:50 -07:00
2021-03-13 11:27:30 -08:00
2021-07-05 13:42:16 -07:00
2021-06-29 10:53:48 -07:00
2021-01-06 08:42:51 -05:00
2021-07-03 11:41:14 -07:00
2021-05-18 20:15:58 -04:00
2021-06-29 10:53:47 -07:00
2021-04-15 22:36:45 -04:00
2021-04-09 14:54:23 -07:00
2020-11-15 09:49:10 -05:00
2021-05-06 19:24:13 -07:00
2021-07-02 12:08:10 -07:00
2021-07-12 11:09:13 -05:00
2021-04-07 13:56:43 -04:00
2020-10-25 20:02:08 -04:00
2021-05-03 11:05:28 -07:00
2021-07-14 09:19:06 -07:00
2021-04-30 11:20:35 -07:00
2021-07-01 12:06:39 -07:00
2021-01-24 14:27:19 +01:00
2021-05-05 11:27:20 -07:00
2021-04-07 13:56:43 -04:00
2021-07-11 16:39:06 -06:00
2021-06-18 09:22:02 -06:00
2021-06-18 09:22:02 -06:00
2021-04-12 15:04:23 +02:00
2021-06-30 20:47:26 -07:00
2021-04-19 09:56:37 +10:00
2021-04-07 13:56:43 -04:00
2021-06-29 10:53:48 -07:00
2021-05-05 13:44:19 -07:00
2021-04-23 10:14:32 +01:00
2021-01-24 14:29:34 +01:00
2021-03-11 07:47:48 -07:00
2021-07-03 11:41:14 -07:00
2021-06-01 12:09:27 +02:00
2021-07-03 11:41:14 -07:00
2021-02-24 13:38:26 -08:00
2021-03-08 15:18:43 +01:00
2021-01-24 14:27:20 +01:00
2021-01-24 14:43:45 +01:00
2021-01-25 23:29:36 -05:00
2021-04-17 11:39:49 -07:00
2021-01-24 14:27:19 +01:00
2021-03-16 22:13:10 +01:00
2021-07-01 11:06:05 -07:00
2021-05-18 16:20:54 -05:00
2021-02-21 11:02:48 -08:00
2021-04-17 23:03:50 -04:00
2021-02-13 17:17:53 +01:00
2021-06-01 07:44:32 -06:00
2021-07-02 12:08:10 -07:00
2021-01-24 14:27:18 +01:00
2021-03-23 11:20:26 +01:00