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
Makefile
uio.c uio: Fix use-after-free in uio_unregister_device() 2020-11-09 18:54:30 +01:00
uio_aec.c
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_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
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