]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hypfs: Fix error number left in struct pointer member
authorDavid Howells <dhowells@redhat.com>
Thu, 21 Mar 2019 10:08:08 +0000 (10:08 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Oct 2019 19:01:02 +0000 (21:01 +0200)
commitfe276165b08188616fca013b3df0f7373e8d51dd
treebd7253e7bc26aa3f16be34676b549cc7edc39af4
parent5ba8ad0cc3a4f36ac711a08f98c39a6e1c72dfed
hypfs: Fix error number left in struct pointer member

[ Upstream commit b54c64f7adeb241423cd46598f458b5486b0375e ]

In hypfs_fill_super(), if hypfs_create_update_file() fails,
sbi->update_file is left holding an error number.  This is passed to
hypfs_kill_super() which doesn't check for this.

Fix this by not setting sbi->update_value until after we've checked for
error.

Fixes: 24bbb1faf3f0 ("[PATCH] s390_hypfs filesystem")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
cc: Heiko Carstens <heiko.carstens@de.ibm.com>
cc: linux-s390@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/hypfs/inode.c