aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmalloc.c
diff options
context:
space:
mode:
authorNiklas Schnelle <[email protected]>2025-05-22 12:13:15 +0000
committerHeiko Carstens <[email protected]>2025-05-22 14:12:53 +0000
commit774a1fa880bc949d88b5ddec9494a13be733dfa8 (patch)
treea4042a0d020327d5dc0a64fd1d314dc779bafc7d /mm/vmalloc.c
parents390/pci: Allow re-add of a reserved but not yet removed device (diff)
downloadkernel-774a1fa880bc949d88b5ddec9494a13be733dfa8.tar.gz
kernel-774a1fa880bc949d88b5ddec9494a13be733dfa8.zip
s390/pci: Serialize device addition and removal
Prior changes ensured that when zpci_release_device() is called and it removed the zdev from the zpci_list this instance can not be found via the zpci_list anymore even while allowing re-add of reserved devices. This only accounts for the overall lifetime and zpci_list addition and removal, it does not yet prevent concurrent add of a new instance for the same underlying device. Such concurrent add would subsequently cause issues such as attempted re-use of the same IOMMU sysfs directory and is generally undesired. Introduce a new zpci_add_remove_lock mutex to serialize adding a new device with removal. Together this ensures that if a struct zpci_dev is not found in the zpci_list it was either already removed and torn down, or its removal and tear down is in progress with the zpci_add_remove_lock held. Cc: [email protected] Fixes: a46044a92add ("s390/pci: fix zpci_zdev_put() on reserve") Reviewed-by: Gerd Bayer <[email protected]> Tested-by: Gerd Bayer <[email protected]> Signed-off-by: Niklas Schnelle <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
Diffstat (limited to 'mm/vmalloc.c')
0 files changed, 0 insertions, 0 deletions