linux-stable/drivers/uio
Christophe JAILLET cdd91637d4 uio_hv_generic: Fix a memory leak in error handling paths
commit 3ee098f96b upstream.

If 'vmbus_establish_gpadl()' fails, the (recv|send)_gpadl will not be
updated and 'hv_uio_cleanup()' in the error handling path will not be
able to free the corresponding buffer.

In such a case, we need to free the buffer explicitly.

Fixes: cdfa835c6e ("uio_hv_generic: defer opening vmbus until first use")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/4fdaff557deef6f0475d02ba7922ddbaa1ab08a6.1620544055.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-26 12:05:17 +02:00
..
Kconfig
Makefile
uio.c uio: Fix use-after-free in uio_unregister_device() 2020-11-18 19:20:29 +01:00
uio_aec.c
uio_cif.c
uio_dmem_genirq.c
uio_fsl_elbc_gpcm.c
uio_hv_generic.c uio_hv_generic: Fix a memory leak in error handling paths 2021-05-26 12:05:17 +02:00
uio_mf624.c
uio_netx.c
uio_pci_generic.c
uio_pdrv_genirq.c uio_pdrv_genirq: fix use without device tree and no interrupt 2020-07-22 09:33:13 +02:00
uio_pruss.c
uio_sercos3.c