bpf: Fix an error code in check_btf_func()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 4 Jun 2020 08:54:36 +0000 (11:54 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:49:04 +0000 (17:49 +0200)
commit51c37c3fac2c4c2cda1a8dfc6c59c2d88d4120d5
tree7db1851cb10570d296b75363e3db9d4f422869fe
parent0c26bff2bb582e06358d36b90f4aca23e11deee7
bpf: Fix an error code in check_btf_func()

[ Upstream commit e7ed83d6fa1a00d0f2ad0327e73d3ea9e7ea8de1 ]

This code returns success if the "info_aux" allocation fails but it
should return -ENOMEM.

Fixes: 8c1b6e69dcc1 ("bpf: Compare BTF types of functions arguments with actual types")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20200604085436.GA943001@mwanda
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/bpf/verifier.c