linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vhost-vdpa:fix the worng input in config_cb
@ 2021-09-29  7:54 Cindy Lu
  2021-09-29  8:32 ` Michael S. Tsirkin
  0 siblings, 1 reply; 3+ messages in thread
From: Cindy Lu @ 2021-09-29  7:54 UTC (permalink / raw)
  To: lulu, mst, jasowang, kvm, virtualization, netdev, linux-kernel

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

Signed-off-by: Cindy Lu <lulu@redhat.com>
---
 drivers/vhost/vdpa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index 942666425a45..e532cbe3d2f7 100644
--- a/drivers/vhost/vdpa.c
+++ b/drivers/vhost/vdpa.c
@@ -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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] vhost-vdpa:fix the worng input in config_cb
  2021-09-29  7:54 [PATCH] vhost-vdpa:fix the worng input in config_cb Cindy Lu
@ 2021-09-29  8:32 ` Michael S. Tsirkin
  2021-09-29  8:51   ` Cindy Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2021-09-29  8:32 UTC (permalink / raw)
  To: Cindy Lu; +Cc: jasowang, kvm, virtualization, netdev, linux-kernel

On Wed, Sep 29, 2021 at 03:54:37PM +0800, Cindy Lu wrote:
> 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
> 
> Signed-off-by: Cindy Lu <lulu@redhat.com>

Maybe add

Fixes: 776f395004d8 ("vhost_vdpa: Support config interrupt in vdpa")

and fix typos in the commit log.

> ---
>  drivers/vhost/vdpa.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
> index 942666425a45..e532cbe3d2f7 100644
> --- a/drivers/vhost/vdpa.c
> +++ b/drivers/vhost/vdpa.c
> @@ -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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vhost-vdpa:fix the worng input in config_cb
  2021-09-29  8:32 ` Michael S. Tsirkin
@ 2021-09-29  8:51   ` Cindy Lu
  0 siblings, 0 replies; 3+ messages in thread
From: Cindy Lu @ 2021-09-29  8:51 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Jason Wang, kvm, virtualization, netdev, linux-kernel

On Wed, Sep 29, 2021 at 4:32 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Wed, Sep 29, 2021 at 03:54:37PM +0800, Cindy Lu wrote:
> > 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
> >
> > Signed-off-by: Cindy Lu <lulu@redhat.com>
>
> 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
> > ---
> >  drivers/vhost/vdpa.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
> > index 942666425a45..e532cbe3d2f7 100644
> > --- a/drivers/vhost/vdpa.c
> > +++ b/drivers/vhost/vdpa.c
> > @@ -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
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-29  8:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29  7:54 [PATCH] vhost-vdpa:fix the worng input in config_cb Cindy Lu
2021-09-29  8:32 ` Michael S. Tsirkin
2021-09-29  8:51   ` Cindy Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).