WSL2-Linux-Kernel/drivers/xen
Dan Carpenter 90314394a1 xen/pvcalls-back: fix double frees with pvcalls_new_active_socket()
commit 8fafac202d upstream.

In the pvcalls_new_active_socket() function, most error paths call
pvcalls_back_release_active(fedata->dev, fedata, map) which calls
sock_release() on "sock".  The bug is that the caller also frees sock.

Fix this by making every error path in pvcalls_new_active_socket()
release the sock, and don't free it in the caller.

Fixes: 5db4d286a8 ("xen/pvcalls: implement connect command")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/e5f98dc2-0305-491f-a860-71bbd1398a2f@kili.mountain
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-30 13:55:32 +01:00
..
events genirq: Add and use an irq_data_update_affinity helper 2023-03-11 13:57:31 +01:00
xen-pciback xen-pciback: Allow setting PCI_MSIX_FLAGS_MASKALL too 2022-12-02 17:41:10 +01:00
xenbus xen/xenbus: fix return type in xenbus_file_read() 2022-08-25 11:40:14 +02:00
xenfs
Kconfig
Makefile
acpi.c
arm-device.c
balloon.c
biomerge.c
cpu_hotplug.c
dbgp.c
efi.c
evtchn.c
features.c
gntalloc.c
gntdev-common.h xen/gntdev: Accommodate VMA splitting 2022-10-26 12:34:24 +02:00
gntdev-dmabuf.c
gntdev-dmabuf.h
gntdev.c xen/gntdev: Accommodate VMA splitting 2022-10-26 12:34:24 +02:00
grant-table.c xen/grants: prevent integer overflow in gnttab_dma_alloc_pages() 2022-09-08 12:28:05 +02:00
manage.c
mcelog.c
mem-reservation.c
pci.c
pcpu.c ACPI: processor: Fix evaluating _PDC method when running as Xen dom0 2023-05-11 23:00:22 +09:00
platform-pci.c xen/platform-pci: add missing free_irq() in error path 2022-12-02 17:41:10 +01:00
privcmd-buf.c
privcmd.c xen/privcmd: Fix a possible warning in privcmd_ioctl_mmap_resource() 2022-12-31 13:14:04 +01:00
privcmd.h
pvcalls-back.c xen/pvcalls-back: fix double frees with pvcalls_new_active_socket() 2023-05-30 13:55:32 +01:00
pvcalls-front.c
pvcalls-front.h
swiotlb-xen.c
sys-hypervisor.c
time.c
unpopulated-alloc.c
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c
xen-front-pgdir-shbuf.c
xen-scsiback.c
xlate_mmu.c