linux-stable/drivers/uio
Christophe JAILLET d84b5e9122 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:06:52 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile
uio.c uio: Fix use-after-free in uio_unregister_device() 2020-11-09 18:54:30 +01:00
uio_aec.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
uio_cif.c
uio_dmem_genirq.c uio: disable lazy irq disable to avoid double fire 2020-07-03 11:02:21 +02:00
uio_fsl_elbc_gpcm.c uio: uio_fsl_elbc_gpcm: convert platform driver to use dev_groups 2019-08-02 12:56:51 +02:00
uio_hv_generic.c uio_hv_generic: Fix a memory leak in error handling paths 2021-05-26 12:06:52 +02:00
uio_mf624.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
uio_netx.c
uio_pci_generic.c
uio_pdrv_genirq.c Merge branch 'char-misc-linus' into 'char-misc-next' 2020-07-10 13:42:33 +02:00
uio_pruss.c
uio_sercos3.c