[dpdk-dev,v6,05/13] vhost-user: handle VHOST_USER_RESET_OWNER correctly
Commit Message
Destroy corresponding device when a VHOST_USER_RESET_OWNER message is
received, otherwise, the vhost-switch would still try to access vq
of that device, which results to SIGSEG fault, and let vhost-switch
crash in the end.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
lib/librte_vhost/vhost_user/vhost-net-user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
2015-10-09 13:46, Yuanhan Liu:
> Destroy corresponding device when a VHOST_USER_RESET_OWNER message is
> received, otherwise, the vhost-switch would still try to access vq
> of that device, which results to SIGSEG fault, and let vhost-switch
> crash in the end.
It is a fix, so the title should look like:
vhost: fix crash when receiving VHOST_USER_RESET_OWNER
and there should be a "Fixes:" tag.
Please could you also review the related patches from Jerome Jutteau?
http://dpdk.org/dev/patchwork/project/dpdk/list/?submitter=354
Thanks
On Tue, Oct 20, 2015 at 09:03:48AM +0200, Thomas Monjalon wrote:
> 2015-10-09 13:46, Yuanhan Liu:
> > Destroy corresponding device when a VHOST_USER_RESET_OWNER message is
> > received, otherwise, the vhost-switch would still try to access vq
> > of that device, which results to SIGSEG fault, and let vhost-switch
> > crash in the end.
>
> It is a fix, so the title should look like:
> vhost: fix crash when receiving VHOST_USER_RESET_OWNER
> and there should be a "Fixes:" tag.
Got it.
>
> Please could you also review the related patches from Jerome Jutteau?
> http://dpdk.org/dev/patchwork/project/dpdk/list/?submitter=354
I've already reviewed v1 in the first time, giving him a series ACK.
However, I had a minor comment, which will not affect my ACK, and he
updated his patch to v2.
Maybe I should make another ACK in this v2.
--yliu
@@ -379,7 +379,7 @@ vserver_message_handler(int connfd, void *dat, int *remove)
ops->set_owner(ctx);
break;
case VHOST_USER_RESET_OWNER:
- ops->reset_owner(ctx);
+ user_destroy_device(ctx);
break;
case VHOST_USER_SET_MEM_TABLE: