]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, s390: Fix potential memory leak about jit_data
authorTiezhu Yang <yangtiezhu@loongson.cn>
Mon, 27 Sep 2021 07:06:14 +0000 (15:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Oct 2021 08:08:20 +0000 (10:08 +0200)
commit16a84ae6dd5983d60878db19f3c325388aa57fe2
tree70115f57028472a36213d4fca1dffdc5e659c883
parentd8efcd19e80dcfe6d463a2b22a6a40b7c2c7a225
bpf, s390: Fix potential memory leak about jit_data

[ Upstream commit 686cb8b9f6b46787f035afe8fbd132a74e6b1bdd ]

Make sure to free jit_data through kfree() in the error path.

Fixes: 194f52a99f3c ("bpf: s390: add JIT support for multi-function programs")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/net/bpf_jit_comp.c