diff --git a/[refs] b/[refs] index f607b9f4f8a0..c24953b9aa33 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8319aa9127a1282b24c3ece473a058d246f35b0d +refs/heads/master: 1d3653a79c4eedf5d6eaaa7328b1d134012b2509 diff --git a/trunk/drivers/vfio/vfio.c b/trunk/drivers/vfio/vfio.c index 17830c9c7cc6..91bcd97d3061 100644 --- a/trunk/drivers/vfio/vfio.c +++ b/trunk/drivers/vfio/vfio.c @@ -1017,18 +1017,18 @@ static int vfio_group_set_container(struct vfio_group *group, int container_fd) struct file *filep; struct vfio_container *container; struct vfio_iommu_driver *driver; - int ret = 0; + int ret = 0, fput_needed; if (atomic_read(&group->container_users)) return -EINVAL; - filep = fget(container_fd); + filep = fget_light(container_fd, &fput_needed); if (!filep) return -EBADF; /* Sanity check, is this really our fd? */ if (filep->f_op != &vfio_fops) { - fput(filep); + fput_light(filep, fput_needed); return -EINVAL; } @@ -1054,7 +1054,7 @@ static int vfio_group_set_container(struct vfio_group *group, int container_fd) unlock_out: mutex_unlock(&container->group_lock); - fput(filep); + fput_light(filep, fput_needed); return ret; }