2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 01:04:08 +08:00
linux-next/drivers/vfio
Parav Pandit 6093e348a5 vfio/mdev: Fix aborting mdev child device removal if one fails
device_for_each_child() stops executing callback function for remaining
child devices, if callback hits an error.
Each child mdev device is independent of each other.
While unregistering parent device, mdev core must remove all child mdev
devices.
Therefore, mdev_device_remove_cb() always returns success so that
device_for_each_child doesn't abort if one child removal hits error.

While at it, improve remove and unregister functions for below simplicity.

There isn't need to pass forced flag pointer during mdev parent
removal which invokes mdev_device_remove(). So simplify the flow.

mdev_device_remove() is called from two paths.
1. mdev_unregister_driver()
     mdev_device_remove_cb()
       mdev_device_remove()
2. remove_store()
     mdev_device_remove()

Fixes: 7b96953bc6 ("vfio: Mediated device Core driver")
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2019-05-07 11:23:13 -06:00
..
mdev vfio/mdev: Fix aborting mdev child device removal if one fails 2019-05-07 11:23:13 -06:00
pci vfio-pci/nvlink2: Fix potential VMA leak 2019-05-01 13:31:41 -06:00
platform vfio: Use dev_printk() when possible 2019-04-22 11:45:42 -06:00
Kconfig drivers/vfio: Allow type-1 IOMMU instantiation with all ARM/ARM64 IOMMUs 2018-09-25 13:01:28 -06:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vfio_iommu_spapr_tce.c vfio/spapr_tce: Make symbol 'tce_iommu_driver_ops' static 2019-04-03 12:42:02 -06:00
vfio_iommu_type1.c vfio/type1: Limit DMA mappings per container 2019-04-03 12:43:05 -06:00
vfio_spapr_eeh.c powerpc/eeh: Improve recovery of passed-through devices 2019-02-05 11:55:44 +11:00
vfio.c vfio: Fix WARNING "do not call blocking ops when !TASK_RUNNING" 2019-04-23 11:30:46 -06:00
virqfd.c fs: add new vfs_poll and file_can_poll helpers 2018-05-26 09:16:44 +02:00