diff mbox series

vsock/virtio: set vsock frontend ready in virtio_vsock_probe()

Message ID 20210720034255.1408-1-tianxianting.txt@linux.alibaba.com (mailing list archive)
State New, archived
Headers show
Series vsock/virtio: set vsock frontend ready in virtio_vsock_probe() | expand

Commit Message

Xianting Tian July 20, 2021, 3:42 a.m. UTC
From: Xianting Tian <xianting.tian@linux.alibaba.com>

Add the missed virtio_device_ready() to set vsock frontend ready.

Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
---
 net/vmw_vsock/virtio_transport.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Xianting TIan July 20, 2021, 3:44 a.m. UTC | #1
Please help review this one, thanks

ignore the one https://lkml.org/lkml/2021/7/19/3279 
<https://lkml.org/lkml/2021/7/19/3279>, which contains wrong mail address.

在 2021/7/20 上午11:42, Xianting Tian 写道:
> From: Xianting Tian <xianting.tian@linux.alibaba.com>
>
> Add the missed virtio_device_ready() to set vsock frontend ready.
>
> Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
> ---
>   net/vmw_vsock/virtio_transport.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c
> index e0c2c992a..eb4c607c4 100644
> --- a/net/vmw_vsock/virtio_transport.c
> +++ b/net/vmw_vsock/virtio_transport.c
> @@ -637,6 +637,8 @@ static int virtio_vsock_probe(struct virtio_device *vdev)
>   	vdev->priv = vsock;
>   	rcu_assign_pointer(the_virtio_vsock, vsock);
>   
> +	virtio_device_ready(vdev);
> +
>   	mutex_unlock(&the_virtio_vsock_mutex);
>   
>   	return 0;
Jason Wang July 20, 2021, 6:28 a.m. UTC | #2
在 2021/7/20 上午11:42, Xianting Tian 写道:
> From: Xianting Tian <xianting.tian@linux.alibaba.com>
>
> Add the missed virtio_device_ready() to set vsock frontend ready.
>
> Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
> ---
>   net/vmw_vsock/virtio_transport.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c
> index e0c2c992a..eb4c607c4 100644
> --- a/net/vmw_vsock/virtio_transport.c
> +++ b/net/vmw_vsock/virtio_transport.c
> @@ -637,6 +637,8 @@ static int virtio_vsock_probe(struct virtio_device *vdev)
>   	vdev->priv = vsock;
>   	rcu_assign_pointer(the_virtio_vsock, vsock);
>   
> +	virtio_device_ready(vdev);
> +
>   	mutex_unlock(&the_virtio_vsock_mutex);


It's better to do this after the mutex_lock().

Thanks


>   
>   	return 0;
Xianting TIan July 20, 2021, 7:05 a.m. UTC | #3
thanks ,

I will sent V2 patch.

在 2021/7/20 下午2:28, Jason Wang 写道:
>
> 在 2021/7/20 上午11:42, Xianting Tian 写道:
>> From: Xianting Tian <xianting.tian@linux.alibaba.com>
>>
>> Add the missed virtio_device_ready() to set vsock frontend ready.
>>
>> Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
>> ---
>>   net/vmw_vsock/virtio_transport.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/net/vmw_vsock/virtio_transport.c 
>> b/net/vmw_vsock/virtio_transport.c
>> index e0c2c992a..eb4c607c4 100644
>> --- a/net/vmw_vsock/virtio_transport.c
>> +++ b/net/vmw_vsock/virtio_transport.c
>> @@ -637,6 +637,8 @@ static int virtio_vsock_probe(struct 
>> virtio_device *vdev)
>>       vdev->priv = vsock;
>>       rcu_assign_pointer(the_virtio_vsock, vsock);
>>   +    virtio_device_ready(vdev);
>> +
>>       mutex_unlock(&the_virtio_vsock_mutex);
>
>
> It's better to do this after the mutex_lock().
>
> Thanks
>
>
>>         return 0;
diff mbox series

Patch

diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c
index e0c2c992a..eb4c607c4 100644
--- a/net/vmw_vsock/virtio_transport.c
+++ b/net/vmw_vsock/virtio_transport.c
@@ -637,6 +637,8 @@  static int virtio_vsock_probe(struct virtio_device *vdev)
 	vdev->priv = vsock;
 	rcu_assign_pointer(the_virtio_vsock, vsock);
 
+	virtio_device_ready(vdev);
+
 	mutex_unlock(&the_virtio_vsock_mutex);
 
 	return 0;