ext4: bubble errors from ext4_find_inline_data_nolock() up to ext4_iget()
authorTheodore Ts'o <tytso@mit.edu>
Tue, 22 May 2018 21:14:07 +0000 (17:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Jun 2018 00:06:29 +0000 (08:06 +0800)
commit02d45ec6e770dcad4a48ad185feff588e3dcedc2
tree6a186e7315e339a5ddd334b1cbe12d357154c9a2
parente81d371dac30019816a1c5a3a2c4c44bb3c68558
ext4: bubble errors from ext4_find_inline_data_nolock() up to ext4_iget()

commit eb9b5f01c33adebc31cbc236c02695f605b0e417 upstream.

If ext4_find_inline_data_nolock() returns an error it needs to get
reflected up to ext4_iget().  In order to fix this,
ext4_iget_extra_inode() needs to return an error (and not return
void).

This is related to "ext4: do not allow external inodes for inline
data" (which fixes CVE-2018-11412) in that in the errors=continue
case, it would be useful to for userspace to receive an error
indicating that file system is corrupted.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/inode.c