linux-stable/drivers/virt/acrn
Xiaolong Huang f8e6e18d11 virt: acrn: fix a memory leak in acrn_dev_ioctl()
[ Upstream commit ecd1735f14 ]

The vm_param and cpu_regs need to be freed via kfree()
before return -EINVAL error.

Fixes: 9c5137aedd ("virt: acrn: Introduce VM management interfaces")
Fixes: 2ad2aaee1b ("virt: acrn: Introduce an ioctl to set vCPU registers state")
Signed-off-by: Xiaolong Huang <butterflyhuangxx@gmail.com>
Signed-off-by: Fei Li <fei1.li@intel.com>
Link: https://lore.kernel.org/r/20220308092047.1008409-1-butterflyhuangxx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 13:58:30 +02:00
..
acrn_drv.h virt: acrn: Introduce irqfd 2021-02-09 10:58:19 +01:00
hsm.c virt: acrn: fix a memory leak in acrn_dev_ioctl() 2022-04-08 13:58:30 +02:00
hypercall.h virt: acrn: Introduce interfaces for virtual device creating/destroying 2021-10-05 16:14:10 +02:00
ioeventfd.c virt: acrn: Introduce ioeventfd 2021-02-09 10:58:19 +01:00
ioreq.c all: replace find_next{,_zero}_bit with find_first{,_zero}_bit where appropriate 2022-01-15 08:47:31 -08:00
irqfd.c virt: acrn: Use EPOLLIN instead of POLLIN 2021-03-10 09:50:23 +01:00
Kconfig virt: acrn: Introduce ioeventfd 2021-02-09 10:58:19 +01:00
Makefile virt: acrn: Introduce irqfd 2021-02-09 10:58:19 +01:00
mm.c virt: acrn: obtain pa from VMA with PFNMAP flag 2022-04-08 13:58:30 +02:00
vm.c virt: acrn: Do hcall_destroy_vm() before resource release 2021-07-27 16:48:45 +02:00