linux-stable/drivers/xen
Dan Carpenter ae8d34feda 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 14:17:26 +01:00
..
events xen: Allow platform PCI interrupt to be shared 2023-02-13 06:53:20 +01:00
xen-pciback xen: make remove callback of xen driver void returned 2022-12-15 16:06:10 +01:00
xenbus driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00
xenfs xen: remove unnecessary (void*) conversions 2023-03-16 12:04:00 +01:00
Kconfig xen: Kconfig: Fix spelling mistake "Maxmium" -> "Maximum" 2022-10-12 08:39:50 +02:00
Makefile
acpi.c
arm-device.c
balloon.c
biomerge.c
cpu_hotplug.c
dbgp.c
efi.c efi: Apply allowlist to EFI configuration tables when running under Xen 2023-01-23 11:33:24 +01:00
evtchn.c
features.c
gntalloc.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
gntdev-common.h
gntdev-dmabuf.c xen/gntdev: Prepare to dynamic dma-buf locking specification 2022-10-18 01:21:47 +03:00
gntdev-dmabuf.h
gntdev.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
grant-dma-iommu.c xen/grant-dma-iommu: Implement a dummy probe_device() callback 2023-02-13 07:22:08 +01:00
grant-dma-ops.c xen/virtio: Handle PCI devices which Host controller is described in DT 2022-12-05 12:59:49 +01:00
grant-table.c
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:17:03 +09:00
platform-pci.c xen: Allow platform PCI interrupt to be shared 2023-02-13 06:53:20 +01:00
privcmd-buf.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
privcmd.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
privcmd.h
pvcalls-back.c xen/pvcalls-back: fix double frees with pvcalls_new_active_socket() 2023-05-30 14:17:26 +01:00
pvcalls-front.c xen/pvcalls: free active map buffer on pvcalls_front_free_map 2023-01-09 08:05:20 +01:00
pvcalls-front.h
swiotlb-xen.c
sys-hypervisor.c xen: sysfs: make kobj_type structure constant 2023-02-18 16:50:21 +01:00
time.c
unpopulated-alloc.c
xen-acpi-pad.c ACPI: make remove callback of ACPI driver void 2022-11-23 19:11:22 +01:00
xen-acpi-processor.c
xen-balloon.c
xen-front-pgdir-shbuf.c xen: Replace one-element array with flexible-array member 2023-02-13 09:15:45 +01:00
xen-scsiback.c xen: make remove callback of xen driver void returned 2022-12-15 16:06:10 +01:00
xlate_mmu.c