linux-stable/drivers/uio
Rafael Mendonca a41a4ae88c uio: uio_dmem_genirq: Fix deadlock between irq config and handling
[ Upstream commit 118b918018 ]

This fixes a concurrency issue addressed in commit 34cb275283 ("UIO: Fix
concurrency issue"):

  "In a SMP case there was a race condition issue between
  Uio_pdrv_genirq_irqcontrol() running on one CPU and irq handler on
  another CPU. Fix it by spin_locking shared resources access inside irq
  handler."

The implementation of "uio_dmem_genirq" was based on "uio_pdrv_genirq" and
it is used in a similar manner to the "uio_pdrv_genirq" driver with respect
to interrupt configuration and handling. At the time "uio_dmem_genirq" was
merged, both had the same implementation of the 'uio_info' handlers
irqcontrol() and handler(), thus, both had the same concurrency issue
mentioned by the above commit. However, the above patch was only applied to
the "uio_pdrv_genirq" driver.

Split out from commit 34cb275283 ("UIO: Fix concurrency issue").

Fixes: 0a0c3b5a24 ("Add new uio device for dynamic memory allocation")
Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com>
Link: https://lore.kernel.org/r/20220930224100.816175-3-rafaelmendsr@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 09:26:23 +01:00
..
Kconfig
Makefile
uio.c uio: Fix use-after-free in uio_unregister_device() 2020-11-18 18:27:58 +01:00
uio_aec.c
uio_cif.c
uio_dmem_genirq.c uio: uio_dmem_genirq: Fix deadlock between irq config and handling 2023-01-18 09:26:23 +01:00
uio_fsl_elbc_gpcm.c
uio_hv_generic.c
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:22:27 +02:00
uio_pruss.c
uio_sercos3.c