linux-sg2042/drivers/uio
Rafael Mendonca b9dcd53356 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>
2022-12-31 13:32:38 +01:00
..
Kconfig uio: Remove leading spaces in Kconfig 2021-05-21 14:52:37 +02:00
Makefile uio: uio_dfl: add userspace i/o driver for DFL bus 2021-03-28 14:58:18 +02:00
uio.c UIO: use default_groups in kobj_type 2021-12-29 10:54:50 +01:00
uio_aec.c uio: uio_aec: Use pci_iounmap instead of iounmap 2021-05-14 13:39:47 +02:00
uio_cif.c uio: uio_cif: use devm_kzalloc() for uio_info object 2020-12-09 19:59:00 +01:00
uio_dfl.c uio: dfl: add IOPLL user-clock feature id 2022-09-01 17:00:33 +02:00
uio_dmem_genirq.c uio: uio_dmem_genirq: Fix deadlock between irq config and handling 2022-12-31 13:32:38 +01:00
uio_fsl_elbc_gpcm.c uio: uio_fsl_elbc_gpcm: use device-managed allocators 2020-12-09 19:59:00 +01:00
uio_hv_generic.c Drivers: hv: vmbus: Mark vmbus ring buffer visible to host in Isolation VM 2021-10-28 11:22:23 +00:00
uio_mf624.c uio: uio_mf624: use devm_kzalloc() for uio_info object 2020-12-09 19:58:54 +01:00
uio_netx.c uio: uio_netx: use devm_kzalloc() for or uio_info object 2020-12-09 19:58:54 +01:00
uio_pci_generic.c Merge 50f09a3dd5 ("Merge tag 'char-misc-5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc") into char-misc-next 2021-05-21 09:48:31 +02:00
uio_pdrv_genirq.c Merge branch 'char-misc-linus' into 'char-misc-next' 2020-07-10 13:42:33 +02:00
uio_pruss.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 2) 2022-06-10 14:51:35 +02:00
uio_sercos3.c uio: uio_sercos3: use device-managed functions for simple allocs 2020-12-09 19:58:54 +01:00