diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2021-04-06 16:40:32 -0300 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2021-04-07 15:39:18 -0600 |
commit | 18d731242d5c67c0783126c42d3f85870cec2df5 (patch) | |
tree | f1273273514af929c7d6f8c111fcbacf5f63fb61 /drivers/vfio/mdev/vfio_mdev.c | |
parent | fbd0e2b0c3d0b2eeaef471c9fe19ae5a7b2ee970 (diff) | |
download | linux-18d731242d5c67c0783126c42d3f85870cec2df5.tar.gz linux-18d731242d5c67c0783126c42d3f85870cec2df5.tar.bz2 linux-18d731242d5c67c0783126c42d3f85870cec2df5.zip |
vfio/mdev: Add missing error handling to dev_set_name()
This can fail, and seems to be a popular target for syzkaller error
injection. Check the error return and unwind with put_device().
Fixes: 7b96953bc640 ("vfio: Mediated device Core driver")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Message-Id: <9-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/mdev/vfio_mdev.c')
0 files changed, 0 insertions, 0 deletions