linux-stable/drivers/xen
Dan Carpenter 8fafac202d xen/pvcalls-back: fix double frees with pvcalls_new_active_socket()
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>
2023-05-24 17:25:43 +02:00
..
events xen: Allow platform PCI interrupt to be shared 2023-02-13 06:53:20 +01:00
xen-pciback xen/pciback: don't call pcistub_device_put() under lock 2023-04-24 07:27:10 +02: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
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
Kconfig xen: Kconfig: Fix spelling mistake "Maxmium" -> "Maximum" 2022-10-12 08:39:50 +02:00
Makefile
manage.c
mcelog.c
mem-reservation.c
pci.c
pcpu.c xen/pcpu: fix possible memory leak in register_pcpu() 2022-11-14 13:29:07 +01: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-24 17:25:43 +02:00
pvcalls-front.c xen/pvcalls: don't call bind_evtchn_to_irqhandler() under lock 2023-04-24 07:27:10 +02: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/scsiback: don't call scsiback_free_translation_entry() under lock 2023-04-24 07:27:10 +02:00
xlate_mmu.c