]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix kernel oops caused by spurious casefold flag
authorTheodore Ts'o <tytso@mit.edu>
Tue, 3 Sep 2019 05:43:17 +0000 (01:43 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 3 Sep 2019 05:43:17 +0000 (01:43 -0400)
commitbb06fe1b2e248e8dfcf4650ad7868469b4d2fdf3
treefd571eddedc34f63bc84e72e6c6c190ec0056be0
parentb7920299b6e05f22d2061b80e5ad821551707dd9
ext4: fix kernel oops caused by spurious casefold flag

If an directory has the a casefold flag set without the casefold
feature set, s_encoding will not be initialized, and this will cause
the kernel to dereference a NULL pointer.  In addition to adding
checks to avoid these kernel oops, attempts to load inodes with the
casefold flag when the casefold feature is not enable will cause the
file system to be declared corrupted.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/dir.c
fs/ext4/hash.c
fs/ext4/inode.c
fs/ext4/namei.c