ext4: add missing error check in __ext4_new_inode()
authorTheodore Ts'o <tytso@mit.edu>
Mon, 11 Dec 2017 04:44:11 +0000 (23:44 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:22 +0000 (10:10 +0100)
commit0228af23dd6962c16682d85fdf1bab6bbf77a007
treea04b5740856a0b1f1ee42bfc10fdfbdb798306ad
parent4ff7da066d64e5083ef886203ba3a0623343c632
ext4: add missing error check in __ext4_new_inode()

commit 996fc4477a0ea28226b30d175f053fb6f9a4fa36 upstream.

It's possible for ext4_get_acl() to return an ERR_PTR.  So we need to
add a check for this case in __ext4_new_inode().  Otherwise on an
error we can end up oops the kernel.

This was getting triggered by xfstests generic/388, which is a test
which exercises the shutdown code path.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/ialloc.c