search for: virtio_vsock_reset_sock

Displaying 20 results from an estimated 27 matches for "virtio_vsock_reset_sock".

2019 May 29
2
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...k); > - flush_work(&vsock->rx_work); > - flush_work(&vsock->tx_work); > - flush_work(&vsock->event_work); > - flush_work(&vsock->send_pkt_work); > - > /* Reset all connected sockets when the device disappear */ > vsock_for_each_connected_socket(virtio_vsock_reset_sock); > > @@ -690,6 +693,9 @@ static void virtio_vsock_remove(struct virtio_device *vdev) > vsock->event_run = false; > mutex_unlock(&vsock->event_lock); > > + /* Flush all pending works */ > + virtio_vsock_flush_works(vsock); > + > /* Flush all devic...
2019 May 29
2
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...k); > - flush_work(&vsock->rx_work); > - flush_work(&vsock->tx_work); > - flush_work(&vsock->event_work); > - flush_work(&vsock->send_pkt_work); > - > /* Reset all connected sockets when the device disappear */ > vsock_for_each_connected_socket(virtio_vsock_reset_sock); > > @@ -690,6 +693,9 @@ static void virtio_vsock_remove(struct virtio_device *vdev) > vsock->event_run = false; > mutex_unlock(&vsock->event_lock); > > + /* Flush all pending works */ > + virtio_vsock_flush_works(vsock); > + > /* Flush all devic...
2019 May 30
2
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...;>> - flush_work(&vsock->tx_work); >>> - flush_work(&vsock->event_work); >>> - flush_work(&vsock->send_pkt_work); >>> - >>> /* Reset all connected sockets when the device disappear */ >>> vsock_for_each_connected_socket(virtio_vsock_reset_sock); >>> @@ -690,6 +693,9 @@ static void virtio_vsock_remove(struct virtio_device *vdev) >>> vsock->event_run = false; >>> mutex_unlock(&vsock->event_lock); >>> + /* Flush all pending works */ >>> + virtio_vsock_flush_works(vsock); >&gt...
2019 May 30
2
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...;>> - flush_work(&vsock->tx_work); >>> - flush_work(&vsock->event_work); >>> - flush_work(&vsock->send_pkt_work); >>> - >>> /* Reset all connected sockets when the device disappear */ >>> vsock_for_each_connected_socket(virtio_vsock_reset_sock); >>> @@ -690,6 +693,9 @@ static void virtio_vsock_remove(struct virtio_device *vdev) >>> vsock->event_run = false; >>> mutex_unlock(&vsock->event_lock); >>> + /* Flush all pending works */ >>> + virtio_vsock_flush_works(vsock); >&gt...
2019 May 28
8
[PATCH 0/4] vsock/virtio: several fixes in the .probe() and .remove()
During the review of "[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver", Stefan pointed out some possible issues in the .probe() and .remove() callbacks of the virtio-vsock driver. This series tries to solve these issues: - Patch 1 postpones the 'the_virtio_vsock' assignment at the end of the .probe() to avoid that some sockets queue works when
2019 May 28
8
[PATCH 0/4] vsock/virtio: several fixes in the .probe() and .remove()
During the review of "[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver", Stefan pointed out some possible issues in the .probe() and .remove() callbacks of the virtio-vsock driver. This series tries to solve these issues: - Patch 1 postpones the 'the_virtio_vsock' assignment at the end of the .probe() to avoid that some sockets queue works when
2016 Dec 06
0
[PATCH 07/10] vsock/virtio: add a missing __le annotation
...sock/virtio_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index 936d7ee..90096b9 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -336,7 +336,7 @@ static void virtio_vsock_reset_sock(struct sock *sk) static void virtio_vsock_update_guest_cid(struct virtio_vsock *vsock) { struct virtio_device *vdev = vsock->vdev; - u64 guest_cid; + __le64 guest_cid; vdev->config->get(vdev, offsetof(struct virtio_vsock_config, guest_cid), &guest_cid, sizeof(guest_cid));...
2019 May 28
0
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...lush_work(&vsock->loopback_work); - flush_work(&vsock->rx_work); - flush_work(&vsock->tx_work); - flush_work(&vsock->event_work); - flush_work(&vsock->send_pkt_work); - /* Reset all connected sockets when the device disappear */ vsock_for_each_connected_socket(virtio_vsock_reset_sock); @@ -690,6 +693,9 @@ static void virtio_vsock_remove(struct virtio_device *vdev) vsock->event_run = false; mutex_unlock(&vsock->event_lock); + /* Flush all pending works */ + virtio_vsock_flush_works(vsock); + /* Flush all device writes and interrupts, device will not use any...
2019 Jun 28
0
[PATCH v2 3/3] vsock/virtio: fix flush of works during the .remove()
...lush_work(&vsock->loopback_work); - flush_work(&vsock->rx_work); - flush_work(&vsock->tx_work); - flush_work(&vsock->event_work); - flush_work(&vsock->send_pkt_work); - /* Reset all connected sockets when the device disappear */ vsock_for_each_connected_socket(virtio_vsock_reset_sock); @@ -740,6 +734,15 @@ static void virtio_vsock_remove(struct virtio_device *vdev) /* Delete virtqueues and flush outstanding callbacks if any */ vdev->config->del_vqs(vdev); + /* Other works can be queued before 'config->del_vqs()', so we flush + * all works before to fre...
2019 Jul 05
0
[PATCH v3 3/3] vsock/virtio: fix flush of works during the .remove()
...lush_work(&vsock->loopback_work); - flush_work(&vsock->rx_work); - flush_work(&vsock->tx_work); - flush_work(&vsock->event_work); - flush_work(&vsock->send_pkt_work); - /* Reset all connected sockets when the device disappear */ vsock_for_each_connected_socket(virtio_vsock_reset_sock); @@ -741,6 +735,15 @@ static void virtio_vsock_remove(struct virtio_device *vdev) /* Delete virtqueues and flush outstanding callbacks if any */ vdev->config->del_vqs(vdev); + /* Other works can be queued before 'config->del_vqs()', so we flush + * all works before to fre...
2019 Jul 05
4
[PATCH v3 0/3] vsock/virtio: several fixes in the .probe() and .remove()
During the review of "[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver", Stefan pointed out some possible issues in the .probe() and .remove() callbacks of the virtio-vsock driver. This series tries to solve these issues: - Patch 1 adds RCU critical sections to avoid use-after-free of 'the_virtio_vsock' pointer. - Patch 2 stops workers before to
2019 May 29
0
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...ck->rx_work); > > - flush_work(&vsock->tx_work); > > - flush_work(&vsock->event_work); > > - flush_work(&vsock->send_pkt_work); > > - > > /* Reset all connected sockets when the device disappear */ > > vsock_for_each_connected_socket(virtio_vsock_reset_sock); > > @@ -690,6 +693,9 @@ static void virtio_vsock_remove(struct virtio_device *vdev) > > vsock->event_run = false; > > mutex_unlock(&vsock->event_lock); > > + /* Flush all pending works */ > > + virtio_vsock_flush_works(vsock); > > + > >...
2019 Jun 28
0
[PATCH v2 2/3] vsock/virtio: stop workers during the .remove()
...ock_event_fill(vsock); + vsock->event_run = true; mutex_unlock(&vsock->event_lock); vdev->priv = vsock; @@ -659,6 +689,24 @@ static void virtio_vsock_remove(struct virtio_device *vdev) /* Reset all connected sockets when the device disappear */ vsock_for_each_connected_socket(virtio_vsock_reset_sock); + /* Stop all work handlers to make sure no one is accessing the device, + * so we can safely call vdev->config->reset(). + */ + mutex_lock(&vsock->rx_lock); + vsock->rx_run = false; + mutex_unlock(&vsock->rx_lock); + + mutex_lock(&vsock->tx_lock); + vsock->tx...
2019 Jul 05
0
[PATCH v3 2/3] vsock/virtio: stop workers during the .remove()
...ock_event_fill(vsock); + vsock->event_run = true; mutex_unlock(&vsock->event_lock); vdev->priv = vsock; @@ -660,6 +690,24 @@ static void virtio_vsock_remove(struct virtio_device *vdev) /* Reset all connected sockets when the device disappear */ vsock_for_each_connected_socket(virtio_vsock_reset_sock); + /* Stop all work handlers to make sure no one is accessing the device, + * so we can safely call vdev->config->reset(). + */ + mutex_lock(&vsock->rx_lock); + vsock->rx_run = false; + mutex_unlock(&vsock->rx_lock); + + mutex_lock(&vsock->tx_lock); + vsock->tx...
2019 May 30
0
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...gt;tx_work); > > > > - flush_work(&vsock->event_work); > > > > - flush_work(&vsock->send_pkt_work); > > > > - > > > > /* Reset all connected sockets when the device disappear */ > > > > vsock_for_each_connected_socket(virtio_vsock_reset_sock); > > > > @@ -690,6 +693,9 @@ static void virtio_vsock_remove(struct virtio_device *vdev) > > > > vsock->event_run = false; > > > > mutex_unlock(&vsock->event_lock); > > > > + /* Flush all pending works */ > > > > + virti...
2019 Feb 01
3
[PATCH v3 0/2] vsock/virtio: fix issues on device hot-unplug
These patches try to handle the hot-unplug of vsock virtio transport device in a proper way. Maybe move the vsock_core_init()/vsock_core_exit() functions in the module_init and module_exit of vsock_virtio_transport module can't be the best way, but the architecture of vsock_core forces us to this approach for now. The vsock_core proto_ops expect a valid pointer to the transport device, so we
2019 Feb 01
3
[PATCH v3 0/2] vsock/virtio: fix issues on device hot-unplug
These patches try to handle the hot-unplug of vsock virtio transport device in a proper way. Maybe move the vsock_core_init()/vsock_core_exit() functions in the module_init and module_exit of vsock_virtio_transport module can't be the best way, but the architecture of vsock_core forces us to this approach for now. The vsock_core proto_ops expect a valid pointer to the transport device, so we
2019 Jun 28
11
[PATCH v2 0/3] vsock/virtio: several fixes in the .probe() and .remove()
During the review of "[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver", Stefan pointed out some possible issues in the .probe() and .remove() callbacks of the virtio-vsock driver. This series tries to solve these issues: - Patch 1 adds RCU critical sections to avoid use-after-free of 'the_virtio_vsock' pointer. - Patch 2 stops workers before to
2019 Jun 28
11
[PATCH v2 0/3] vsock/virtio: several fixes in the .probe() and .remove()
During the review of "[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver", Stefan pointed out some possible issues in the .probe() and .remove() callbacks of the virtio-vsock driver. This series tries to solve these issues: - Patch 1 adds RCU critical sections to avoid use-after-free of 'the_virtio_vsock' pointer. - Patch 2 stops workers before to
2019 May 30
2
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...ork); >>>>> - flush_work(&vsock->event_work); >>>>> - flush_work(&vsock->send_pkt_work); >>>>> - >>>>> /* Reset all connected sockets when the device disappear */ >>>>> vsock_for_each_connected_socket(virtio_vsock_reset_sock); >>>>> @@ -690,6 +693,9 @@ static void virtio_vsock_remove(struct virtio_device *vdev) >>>>> vsock->event_run = false; >>>>> mutex_unlock(&vsock->event_lock); >>>>> + /* Flush all pending works */ >>>>>...