linux/drivers/vfio/mdev
Jason Gunthorpe 2aa72ec97c vfio/mdev: Use the driver core to create the 'remove' file
The device creator is supposed to use the dev.groups value to add sysfs
files before device_add is called, not call sysfs_create_files() after
device_add() returns. This creates a race with uevent delivery where the
extra attribute will not be visible.

This was being done because the groups had been co-opted by the mdev
driver, now that prior patches have moved the driver's groups to the
struct device_driver the dev.group is properly free for use here.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-34-hch@lst.de
Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com>
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com>
2022-04-21 07:36:56 -04:00
..
Kconfig vfio: Use kconfig if XX/endif blocks instead of repeating 'depends on' 2021-08-26 10:36:51 -06:00
Makefile vfio/mdev: Remove vfio_mdev.c 2022-04-21 07:36:56 -04:00
mdev_core.c vfio/mdev: Use the driver core to create the 'remove' file 2022-04-21 07:36:56 -04:00
mdev_driver.c vfio/mdev: Remove vfio_mdev.c 2022-04-21 07:36:56 -04:00
mdev_private.h vfio/mdev: Use the driver core to create the 'remove' file 2022-04-21 07:36:56 -04:00
mdev_sysfs.c vfio/mdev: Use the driver core to create the 'remove' file 2022-04-21 07:36:56 -04:00