Skip to content

Commit

Permalink
vfio: don't dereference after kfree...
Browse files Browse the repository at this point in the history
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Aug 22, 2012
1 parent 312b90f commit 934ad4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/vfio/vfio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 934ad4c

Please sign in to comment.