Using get_config_ll_entry in reset_owner don't show any error when the
device is not found. This patch fix this by using get_device instead
instead of get_config_ll_entry.
Signed-off-by: Jerome Jutteau
---
lib/librte_vhost/virtio-net.c | 15 +++
1 file changed, 7 insertions(+), 8
get_device return is not checked and may cause segfault when device is
not found. This patch fix this.
Signed-off-by: Jerome Jutteau
---
lib/librte_vhost/vhost_user/virtio-net-user.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_vhost/vhost_user/virtio-net-user.c
b/lib
virtio-net search for it's device in reset_owner.
The function don't check the return result of get_config_ll_entry
which can be NULL.
Signed-off-by: Jerome Jutteau
---
lib/librte_vhost/virtio-net.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_vhost/virtio-net.c b/lib
virtio-net clean and init device after a VHOST_USER_RESET_OWNER.
This reset device identifier to 0 and break ll_root listing logic.
This patch keep the old device identifier and re-write it on the cleaned
device.
Signed-off-by: Jerome Jutteau
---
lib/librte_vhost/virtio-net.c | 3 +++
1 file
more checks when searching for a device.
In this v2, we use get_device instead of get_config_ll_entry to get an error
message when a device is not found.
Jerome Jutteau (4):
vhost: avoid device identifier to be reset to 0 in reset_owner
vhost: check that a device exists during reset_owner
get_device return is not checked and may cause segfault when device is
not found. This patch fix this.
Signed-off-by: Jerome Jutteau
---
lib/librte_vhost/vhost_user/virtio-net-user.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_vhost/vhost_user/virtio-net-user.c
b/lib
virtio-net search for it's device in reset_owner.
The function don't check the return result of get_config_ll_entry
which can be NULL.
Signed-off-by: Jerome Jutteau
---
lib/librte_vhost/virtio-net.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_vhost/virtio-net.c b/lib
virtio-net clean and init device after a VHOST_USER_RESET_OWNER.
This reset device identifier to 0 and break ll_root listing logic.
This patch keep the old device identifier and re-write it on the cleaned
device.
Signed-off-by: Jerome Jutteau
---
lib/librte_vhost/virtio-net.c | 3 +++
1 file
more checks when searching for a device.
Jerome Jutteau (3):
vhost: avoid device identifier to be reset to 0 in reset_owner
vhost: check that a device exists during reset_owner
vhost: protect user_get_vring_base from unknown devices
lib/librte_vhost/vhost_user/virtio-net-user.c | 2 ++
lib
9 matches
Mail list logo