diff options
author | Jason Gunthorpe <[email protected]> | 2021-03-30 09:53:06 -0600 |
---|---|---|
committer | Alex Williamson <[email protected]> | 2021-04-06 11:55:10 -0600 |
commit | 2b1fe162e584a88ec7f12a651a2a50f94dd8cfac (patch) | |
tree | 701a50ccc922ed6cc440402ebe9d9ffa57c31239 /lib/mpi/mpi-sub-ui.c | |
parent | cb6164586814bbe41f55559ae5505d8373d6f781 (diff) |
vfio/fsl-mc: Re-order vfio_fsl_mc_probe()
vfio_add_group_dev() must be called only after all of the private data in
vdev is fully setup and ready, otherwise there could be races with user
space instantiating a device file descriptor and starting to call ops.
For instance vfio_fsl_mc_reflck_attach() sets vdev->reflck and
vfio_fsl_mc_open(), called by fops open, unconditionally derefs it, which
will crash if things get out of order.
This driver started life with the right sequence, but two commits added
stuff after vfio_add_group_dev().
Fixes: 2e0d29561f59 ("vfio/fsl-mc: Add irq infrastructure for fsl-mc devices")
Fixes: f2ba7e8c947b ("vfio/fsl-mc: Added lock support in preparation for interrupt handling")
Co-developed-by: Diana Craciun OSS <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions