diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-17 19:49:09 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-22 10:23:04 -0400 |
commit | 934ad4c235f87dcb9206abdfa22922358999afab (patch) | |
tree | b6589b1db3544cae6f14f1b4d4041c1066f48bde /drivers | |
parent | 312b90fbed0e07f61d2f060789440a83df6bba23 (diff) | |
download | op-kernel-dev-934ad4c235f87dcb9206abdfa22922358999afab.zip op-kernel-dev-934ad4c235f87dcb9206abdfa22922358999afab.tar.gz |
vfio: don't dereference after kfree...
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/vfio/vfio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c index 9591e2b..0b025d5 100644 --- a/drivers/vfio/vfio.c +++ b/drivers/vfio/vfio.c @@ -416,8 +416,9 @@ static void vfio_device_release(struct kref *kref) /* Device reference always implies a group reference */ static void vfio_device_put(struct vfio_device *device) { + struct vfio_group *group = device->group; kref_put(&device->kref, vfio_device_release); - vfio_group_put(device->group); + vfio_group_put(group); } static void vfio_device_get(struct vfio_device *device) |