linux-stable/drivers/uio
Dan Carpenter bb5f531d73 uio: Fix an Oops on load
commit 432798195b upstream.

I was trying to solve a double free but I introduced a more serious
NULL dereference bug.  The problem is that if there is an IRQ which
triggers immediately, then we need "info->uio_dev" but it's not set yet.

This patch puts the original initialization back to how it was and just
sets info->uio_dev to NULL on the error path so it should solve both
the Oops and the double free.

Fixes: f019f07ecf ("uio: potential double frees if __uio_register_device() fails")
Reported-by: Mathias Thore <Mathias.Thore@infinera.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Tested-by: Mathias Thore <Mathias.Thore@infinera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27 16:09:41 +01:00
..
Kconfig uio: UIO_PRUSS should depend on HAS_DMA 2015-08-05 13:25:59 -07:00
Makefile uio: uio_fsl_elbc_gpcm: new driver 2015-01-12 05:04:13 -08:00
uio.c uio: Fix an Oops on load 2018-11-27 16:09:41 +01:00
uio_aec.c
uio_cif.c
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_mf624.c
uio_netx.c
uio_pci_generic.c
uio_pdrv_genirq.c Revert "uio: constify of_device_id array" 2015-04-03 16:04:21 +02:00
uio_pruss.c uio: pruss: Include <linux/sizes.h> 2015-06-12 17:01:43 -07:00
uio_sercos3.c