Skip to contentSkip to conversation

hw/vfio-user: use a valid object ID for iothread

PATCH In review Daniel P. Berrangé 4 participants 4 messages May 20 – May 26

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/vfio-user: use a valid object ID for iothread

The objectg_new_with_propv/props methods failed to validate that the QOM "id" was well formed. This allowed the vfio-user code to use an invalid ID of "VFIO user" (space is not permitted) in its internal code.

---
 hw/vfio-user/proxy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/vfio-user/proxy.c +1 -1
index 314dfd23d8..3d0d72e8b7 100644
@@ -933,7 +933,7 @@ VFIOUserProxy *vfio_user_connect_dev(SocketAddress *addr, Error **errp)
     qemu_cond_init(&proxy->close_cv);
 
     if (vfio_user_iothread == NULL) {
-        vfio_user_iothread = iothread_create("VFIO user", errp);
+        vfio_user_iothread = iothread_create("vfio-user", errp);
     }
 
     proxy->ctx = iothread_get_aio_context(vfio_user_iothread);
Signature · 1 line
2.54.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Daniel P. Berrangé

The objectg_new_with_propv/props methods failed to validate that the QOM "id" was well formed. This allowed the vfio-user code to use an invalid ID of "VFIO user" (space is not permitted) in its internal code.

---
  hw/vfio-user/proxy.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/vfio-user/proxy.c +0 -0
index 314dfd23d8..3d0d72e8b7 100644

hw/vfio-user/proxy.c VFIOUserProxy *vfio_user_connect_dev(SocketAddress *addr, Error **errp) · line 939

Quoted 8 lines
hw/vfio-user/proxy.c +1 -1
@@ -933,7 +933,7 @@ VFIOUserProxy *vfio_user_connect_dev(SocketAddress *addr, Error **errp)
      qemu_cond_init(&proxy->close_cv);
 
      if (vfio_user_iothread == NULL) {
-        vfio_user_iothread = iothread_create("VFIO user", errp);
+        vfio_user_iothread = iothread_create("vfio-user", errp);
      }
 
      proxy->ctx = iothread_get_aio_context(vfio_user_iothread);

Thanks,

C.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Daniel P. Berrangé
Quoted 15 lines · Daniel P. Berrangé

The objectg_new_with_propv/props methods failed to validate that the QOM "id" was well formed. This allowed the vfio-user code to use an invalid ID of "VFIO user" (space is not permitted) in its internal code.

---
  hw/vfio-user/proxy.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/vfio-user/proxy.c +0 -0
index 314dfd23d8..3d0d72e8b7 100644

hw/vfio-user/proxy.c VFIOUserProxy *vfio_user_connect_dev(SocketAddress *addr, Error **errp) · line 939

Quoted 8 lines
hw/vfio-user/proxy.c +1 -1
@@ -933,7 +933,7 @@ VFIOUserProxy *vfio_user_connect_dev(SocketAddress *addr, Error **errp)
      qemu_cond_init(&proxy->close_cv);
 
      if (vfio_user_iothread == NULL) {
-        vfio_user_iothread = iothread_create("VFIO user", errp);
+        vfio_user_iothread = iothread_create("vfio-user", errp);
      }
 
      proxy->ctx = iothread_get_aio_context(vfio_user_iothread);

ATB,

Mark.

Reviewed-by on v1 1/1
#3 lore raw
In reply to Daniel P. Berrangé
Quoted 15 lines · Daniel P. Berrangé

The objectg_new_with_propv/props methods failed to validate that the QOM "id" was well formed. This allowed the vfio-user code to use an invalid ID of "VFIO user" (space is not permitted) in its internal code.

---
 hw/vfio-user/proxy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/vfio-user/proxy.c +0 -0
index 314dfd23d8..3d0d72e8b7 100644

hw/vfio-user/proxy.c VFIOUserProxy *vfio_user_connect_dev(SocketAddress *addr, Error **errp) · line 939

Quoted 8 lines
hw/vfio-user/proxy.c +1 -1
@@ -933,7 +933,7 @@ VFIOUserProxy *vfio_user_connect_dev(SocketAddress *addr, Error **errp)
     qemu_cond_init(&proxy->close_cv);
 
     if (vfio_user_iothread == NULL) {
-        vfio_user_iothread = iothread_create("VFIO user", errp);
+        vfio_user_iothread = iothread_create("vfio-user", errp);
     }
 
     proxy->ctx = iothread_get_aio_context(vfio_user_iothread);