]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
hypfs_kill_super(): deal with failed allocations
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 3 Apr 2018 03:50:31 +0000 (23:50 -0400)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 15:49:50 +0000 (11:49 -0400)
BugLink: http://bugs.launchpad.net/bugs/1773233
commit a24cd490739586a7d2da3549a1844e1d7c4f4fc4 upstream.

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 <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/s390/hypfs/inode.c

index 43bbe63e2992c1ef525597bf4475b5f4c26d134b..06b513d192b9bc5cd3e589a7a220d126744cadf4 100644 (file)
@@ -320,7 +320,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;