vhost-vdpa:fix the worng input in config_cb
Subsystems (5)
PATCH 1/1 vhost-vdpa:fix the worng input in config_cb
Fix the worng input in for config_cb, in function vhost_vdpa_config_cb, the input cb.private was used as struct vhost_vdpa, So the inuput was worng here, fix this issue
--- drivers/vhost/vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vhost/vdpa.c +1 -1
@@ -322,7 +322,7 @@ static long vhost_vdpa_set_config_call(struct vhost_vdpa *v, u32 __user *argp)struct eventfd_ctx *ctx; cb.callback = vhost_vdpa_config_cb; - cb.private = v->vdpa; + cb.private = v;if (copy_from_user (&fd, argp,sizeof (fd)))return -EFAULT ;
Signature · 1 line
2.21.3
Michael S. Tsirkin
maintainerQuoted 6 lines · Cindy Lu
Fix the worng input in for
config_cb, in functionvhost_vdpa_config_cb, the input cb.private was used as structvhost_vdpa, So the inuput was worng here, fix this issueSigned-off-by Cindy Lu <[email protected]>
Maybe add
and fix typos in the commit log.
Quoted 19 lines
--- drivers/vhost/vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/vhost/vdpa.c +1
-1@@ -322,7 +322,7 @@ static long vhost_vdpa_set_config_call(struct vhost_vdpa *v, u32 __user *argp)struct eventfd_ctx *ctx; cb.callback = vhost_vdpa_config_cb; - cb.private = v->vdpa; + cb.private = v;if (copy_from_user (&fd, argp,sizeof (fd)))return -EFAULT ;Signature · 1 line
2.21.3
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Quoted 7 lines · Michael S. Tsirkin
Quoted 5 lines · Cindy Lu
Fix the worng input in for
config_cb, in functionvhost_vdpa_config_cb, the input cb.private was used as structvhost_vdpa, So the inuput was worng here, fix this issue
Quoted 8 lines
Quoted 1 line
Signed-off-by Cindy Lu <[email protected]>Maybe add
Fixes 776f395004d8 ("vhost_vdpa: Support config interrupt in vdpa")and fix typos in the commit log.
thanks Michael, I will post a new version
Quoted 20 lines
Quoted 19 lines
--- drivers/vhost/vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/vhost/vdpa.c +1
-2@@ -322,7 +322,7 @@ static long vhost_vdpa_set_config_call(struct vhost_vdpa *v, u32 __user *argp)struct eventfd_ctx *ctx; cb.callback = vhost_vdpa_config_cb; - cb.private = v->vdpa; + cb.private = v;if (copy_from_user (&fd, argp,sizeof (fd)))return -EFAULT ; --2.21.3