Commit 640c8c3
ext4: fix deadlock when converting an inline directory in nojournal mode
commit f4ce24f upstream.
In no journal mode, ext4_finish_convert_inline_dir() can self-deadlock
by calling ext4_handle_dirty_dirblock() when it already has taken the
directory lock. There is a similar self-deadlock in
ext4_incvert_inline_data_nolock() for data files which we'll fix at
the same time.
A simple reproducer demonstrating the problem:
mke2fs -Fq -t ext2 -O inline_data -b 4k /dev/vdc 64
mount -t ext4 -o dirsync /dev/vdc /vdc
cd /vdc
mkdir file0
cd file0
touch file0
touch file1
attr -s BurnSpaceInEA -V abcde .
touch supercalifragilisticexpialidocious
Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20230507021608.1290720-1-tytso@mit.edu
Reported-by: syzbot+91dccab7c64e2850a4e5@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?id=ba84cc80a9491d65416bc7877e1650c87530fe8a
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent b253193 commit 640c8c3
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1185 | 1185 | | |
1186 | 1186 | | |
1187 | 1187 | | |
| 1188 | + | |
1188 | 1189 | | |
1189 | 1190 | | |
1190 | 1191 | | |
| |||
1259 | 1260 | | |
1260 | 1261 | | |
1261 | 1262 | | |
| 1263 | + | |
1262 | 1264 | | |
1263 | 1265 | | |
1264 | 1266 | | |
1265 | 1267 | | |
1266 | 1268 | | |
1267 | 1269 | | |
1268 | 1270 | | |
1269 | | - | |
1270 | 1271 | | |
1271 | 1272 | | |
1272 | 1273 | | |
| |||
0 commit comments