> +                     file = *(const struct vhost_vring_file *)in_buf;
> +                     LOG_DEBUG(VHOST_CONFIG,
> +                             "idx:%d fd:%d\n", file.index, file.fd);
> +                     fd = eventfd_copy(file.fd, ctx.pid);
> +                     if (fd < 0) {
> +                             fuse_reply_ioctl(req, -1, NULL, 0);
> +                             result = -1;
> +                             break;
> +                     }
> +                     file.fd = fd;
> +                     if (cmd == VHOST_SET_VRING_KICK)
> +                             VHOST_IOCTL_R(struct vhost_vring_file, file,
> ops->set_vring_kick);
> +                     else
> +                             VHOST_IOCTL_R(struct vhost_vring_file, file,
> ops->set_vring_call);
File doesn't get the new fd, but is again assigned with the value in in_buf in 
VHOST_IOCTL_R.
Fix the bug in the next version of patch.

> +             }
>               break;
> 

Reply via email to