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>
Mon, 25 Jun 2018 23:51:22 +0000 (07:51 +0800)
commit7e0ecf69e6b3098e4156f2434d6a33269ff370f5
tree1ad38e043812bff765e3aa6abbc5bba73472074e
parent49e5abce91a0538a909794681619a2580dccfce0
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