From: Al Viro Date: Tue, 3 Apr 2018 03:50:31 +0000 (-0400) Subject: hypfs_kill_super(): deal with failed allocations X-Git-Tag: v4.1.52~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26361574ff001eb91c8d7d860cf8e0064c7867fc;p=thirdparty%2Fkernel%2Fstable.git hypfs_kill_super(): deal with failed allocations [ Upstream commit a24cd490739586a7d2da3549a1844e1d7c4f4fc4 ] hypfs_fill_super() might fail to allocate sbi; hypfs_kill_super() should not oops on that. Cc: stable@vger.kernel.org Signed-off-by: Al Viro Signed-off-by: Sasha Levin --- diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index 2eeb0a0f506d5..8e40530fd39c2 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c @@ -323,7 +323,7 @@ static void hypfs_kill_super(struct super_block *sb) if (sb->s_root) hypfs_delete_tree(sb->s_root); - if (sb_info->update_file) + if (sb_info && sb_info->update_file) hypfs_remove(sb_info->update_file); kfree(sb->s_fs_info); sb->s_fs_info = NULL;