Commit bcef9356 authored by Cindy Lu's avatar Cindy Lu Committed by Michael S. Tsirkin

vhost-vdpa: Fix the wrong input in config_cb

Fix the wrong input in for config_cb. In function vhost_vdpa_config_cb,
the input cb.private was used as struct vhost_vdpa, so the input was
wrong here, fix this issue

Fixes: 776f3950 ("vhost_vdpa: Support config interrupt in vdpa")
Signed-off-by: default avatarCindy Lu <lulu@redhat.com>
Link: https://lore.kernel.org/r/20210929090933.20465-1-lulu@redhat.comSigned-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 09b6addf
...@@ -322,7 +322,7 @@ static long vhost_vdpa_set_config_call(struct vhost_vdpa *v, u32 __user *argp) ...@@ -322,7 +322,7 @@ static long vhost_vdpa_set_config_call(struct vhost_vdpa *v, u32 __user *argp)
struct eventfd_ctx *ctx; struct eventfd_ctx *ctx;
cb.callback = vhost_vdpa_config_cb; cb.callback = vhost_vdpa_config_cb;
cb.private = v->vdpa; cb.private = v;
if (copy_from_user(&fd, argp, sizeof(fd))) if (copy_from_user(&fd, argp, sizeof(fd)))
return -EFAULT; return -EFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment