binfmt: Fix error return code in load_elf_fdpic_binary()
authorWang Yufen <wangyufen@huawei.com>
Fri, 2 Dec 2022 01:41:01 +0000 (09:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 10:58:46 +0000 (11:58 +0100)
commitfcb94283e01422cdaeba3d2771759962a17f4113
tree496b68a660b0885c55b54944fe2fd44ef575b8f6
parented9947277b2d29c1663fbe6cc9e94fa23d8cafe8
binfmt: Fix error return code in load_elf_fdpic_binary()

commit e7f703ff2507f4e9f496da96cd4b78fd3026120c upstream.

Fix to return a negative error code from create_elf_fdpic_tables()
instead of 0.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Wang Yufen <wangyufen@huawei.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/1669945261-30271-1-git-send-email-wangyufen@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/binfmt_elf_fdpic.c