Skip to contentSkip to conversation

vhost_vdpa: fix the problem in vhost_vdpa_set_config_call

PATCH Superseded Cindy Lu 3 participants 5 messages Jan 12, 2021 – Jan 13, 2021

Subsystems (6)
lore
Share & tools
lore

Cindy Lu

author
#0 lore raw

PATCH v3 1/1 vhost_vdpa: fix the problem in vhost_vdpa_set_config_call

In vhost_vdpa_set_config_call, the cb.private should be vhost_vdpa. this cb.private will finally use in vhost_vdpa_config_cb as vhost_vdpa. Fix this issue.

Fixes 776f395004d82 ("vhost_vdpa: Support config interrupt in vdpa")
---
 drivers/vhost/vdpa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vhost/vdpa.c +1 -1
index ef688c8c0e0e..3fbb9c1f49da 100644
@@ -319,7 +319,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
maintainer
#1 lore raw
Quoted 10 lines · Cindy Lu

In vhost_vdpa_set_config_call, the cb.private should be vhost_vdpa. this cb.private will finally use in vhost_vdpa_config_cb as vhost_vdpa. Fix this issue.

Fixes 776f395004d82 ("vhost_vdpa: Support config interrupt in vdpa")
---
 drivers/vhost/vdpa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

<formletter>

This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

author
#2 lore raw
Quoted 13 lines · Greg KH
Quoted 10 lines · Cindy Lu

In vhost_vdpa_set_config_call, the cb.private should be vhost_vdpa. this cb.private will finally use in vhost_vdpa_config_cb as vhost_vdpa. Fix this issue.

Fixes 776f395004d82 ("vhost_vdpa: Support config interrupt in vdpa")
---
 drivers/vhost/vdpa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 9 lines

<formletter>

This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

Thanks Greg, I will fix this and send a new version

#3 lore raw
In reply to Cindy Lu
Quoted 8 lines · Cindy Lu

In vhost_vdpa_set_config_call, the cb.private should be vhost_vdpa. this cb.private will finally use in vhost_vdpa_config_cb as vhost_vdpa. Fix this issue.

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

---

Hi Cindy:

I think at least you forget to cc stable.

Thanks

Quoted 8 lines
  drivers/vhost/vdpa.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vhost/vdpa.c +0 -0
index ef688c8c0e0e..3fbb9c1f49da 100644

drivers/vhost/vdpa.c static long vhost_vdpa_set_config_call(struct vhost_vdpa *v, u32 __user *argp) · line 325

Quoted 8 lines
drivers/vhost/vdpa.c +1 -1
@@ -319,7 +319,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;
 

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

author
#4 lore raw
Quoted 13 lines · Jason Wang
Quoted 8 lines · Cindy Lu

In vhost_vdpa_set_config_call, the cb.private should be vhost_vdpa. this cb.private will finally use in vhost_vdpa_config_cb as vhost_vdpa. Fix this issue.

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

---

Quoted 6 lines

Hi Cindy:

I think at least you forget to cc stable.

Thanks

Sure Thanks Jason I will post a new version

Quoted 18 lines
Quoted 17 lines
  drivers/vhost/vdpa.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vhost/vdpa.c +1 -1
index ef688c8c0e0e..3fbb9c1f49da 100644
@@ -319,7 +319,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;