1
0
Fork 0
remarkable-linux/drivers/uio
Dan Carpenter 16c6e01a4a uio: potential double frees if __uio_register_device() fails
[ Upstream commit f019f07ecf ]

The uio_unregister_device() function assumes that if "info->uio_dev" is
non-NULL that means "info" is fully allocated.  Setting info->uio_de
has to be the last thing in the function.

In the current code, if request_threaded_irq() fails then we return with
info->uio_dev set to non-NULL but info is not fully allocated and it can
lead to double frees.

Fixes: beafc54c4e ("UIO: Add the User IO core code")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-19 22:43:40 +02:00
..
Kconfig uio-hv-generic: new userspace i/o driver for VMBus 2016-12-06 11:52:49 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uio.c uio: potential double frees if __uio_register_device() fails 2018-09-19 22:43:40 +02:00
uio_aec.c
uio_cif.c uio: uio_cif: remove unnecessary pci_set_drvdata() 2013-09-26 08:47:25 -07:00
uio_dmem_genirq.c uio: fix dmem_region_start computation 2016-08-31 13:07:30 +02:00
uio_fsl_elbc_gpcm.c uio: uio_fsl_elbc_gpcm: Fix module autoload for OF platform driver 2015-10-04 12:32:25 +01:00
uio_hv_generic.c uio_hv_generic: check that host supports monitor page 2018-04-12 12:32:19 +02:00
uio_mf624.c uio_mf624: Align memory regions to page size and set correct offsets 2017-04-08 18:13:28 +02:00
uio_netx.c uio: uio_netx: remove unnecessary pci_set_drvdata() 2013-09-26 08:47:25 -07:00
uio_pci_generic.c uio/uio_pci_generic: don't fail probe if pdev->irq == NULL 2017-05-18 16:59:06 +02:00
uio_pdrv_genirq.c Revert "uio: constify of_device_id array" 2015-04-03 16:04:21 +02:00
uio_pruss.c uio: pruss: add clk_disable() 2016-11-29 20:43:12 +01:00
uio_sercos3.c uio: uio_sercos3: remove unnecessary pci_set_drvdata() 2013-09-26 08:47:25 -07:00