search for: vsock_transport_cancel_pkt

Displaying 20 results from an estimated 34 matches for "vsock_transport_cancel_pkt".

2016 Dec 08
2
[PATCH v3 4/4] vsock: cancel packets when failing to connect
...14 insertions(+) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 8a398b3..c73b03a 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1101,10 +1101,19 @@ static const struct proto_ops vsock_dgram_ops = { .sendpage = sock_no_sendpage, }; +static int vsock_transport_cancel_pkt(struct vsock_sock *vsk) +{ + if (!transport->cancel_pkt) + return -EOPNOTSUPP; + + return transport->cancel_pkt(vsk); +} + static void vsock_connect_timeout(struct work_struct *work) { struct sock *sk; struct vsock_sock *vsk; + int cancel = 0; vsk = container_of(work, struct vsock_...
2016 Dec 08
2
[PATCH v3 4/4] vsock: cancel packets when failing to connect
...14 insertions(+) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 8a398b3..c73b03a 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1101,10 +1101,19 @@ static const struct proto_ops vsock_dgram_ops = { .sendpage = sock_no_sendpage, }; +static int vsock_transport_cancel_pkt(struct vsock_sock *vsk) +{ + if (!transport->cancel_pkt) + return -EOPNOTSUPP; + + return transport->cancel_pkt(vsk); +} + static void vsock_connect_timeout(struct work_struct *work) { struct sock *sk; struct vsock_sock *vsk; + int cancel = 0; vsk = container_of(work, struct vsock_...
2019 May 31
2
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...gt;>>>>>> + */ >>>>>>> + virtio_vsock_flush_works(vsock); >>>>>> Some questions after a quick glance: >>>>>> >>>>>> 1) It looks to me that the work could be queued from the path of >>>>>> vsock_transport_cancel_pkt() . Is that synchronized here? >>>>>> >>>>> Both virtio_transport_send_pkt() and vsock_transport_cancel_pkt() can >>>>> queue work from the upper layer (socket). >>>>> >>>>> Setting the_virtio_vsock to NULL, should synchr...
2019 May 31
2
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...gt;>>>>>> + */ >>>>>>> + virtio_vsock_flush_works(vsock); >>>>>> Some questions after a quick glance: >>>>>> >>>>>> 1) It looks to me that the work could be queued from the path of >>>>>> vsock_transport_cancel_pkt() . Is that synchronized here? >>>>>> >>>>> Both virtio_transport_send_pkt() and vsock_transport_cancel_pkt() can >>>>> queue work from the upper layer (socket). >>>>> >>>>> Setting the_virtio_vsock to NULL, should synchr...
2019 May 30
2
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...free the vsock object to avoid use after free. >>>>> + */ >>>>> + virtio_vsock_flush_works(vsock); >>>> Some questions after a quick glance: >>>> >>>> 1) It looks to me that the work could be queued from the path of >>>> vsock_transport_cancel_pkt() . Is that synchronized here? >>>> >>> Both virtio_transport_send_pkt() and vsock_transport_cancel_pkt() can >>> queue work from the upper layer (socket). >>> >>> Setting the_virtio_vsock to NULL, should synchronize, but after a careful look >>...
2019 May 30
2
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...free the vsock object to avoid use after free. >>>>> + */ >>>>> + virtio_vsock_flush_works(vsock); >>>> Some questions after a quick glance: >>>> >>>> 1) It looks to me that the work could be queued from the path of >>>> vsock_transport_cancel_pkt() . Is that synchronized here? >>>> >>> Both virtio_transport_send_pkt() and vsock_transport_cancel_pkt() can >>> queue work from the upper layer (socket). >>> >>> Setting the_virtio_vsock to NULL, should synchronize, but after a careful look >>...
2019 Jun 13
1
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...t;>>>>>>> + virtio_vsock_flush_works(vsock); >>>>>>>> Some questions after a quick glance: >>>>>>>> >>>>>>>> 1) It looks to me that the work could be queued from the path of >>>>>>>> vsock_transport_cancel_pkt() . Is that synchronized here? >>>>>>>> >>>>>>> Both virtio_transport_send_pkt() and vsock_transport_cancel_pkt() can >>>>>>> queue work from the upper layer (socket). >>>>>>> >>>>>>> Setting...
2019 May 30
2
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...>>> + * all works before to free the vsock object to avoid use after free. >>> + */ >>> + virtio_vsock_flush_works(vsock); >> >> Some questions after a quick glance: >> >> 1) It looks to me that the work could be queued from the path of >> vsock_transport_cancel_pkt() . Is that synchronized here? >> > Both virtio_transport_send_pkt() and vsock_transport_cancel_pkt() can > queue work from the upper layer (socket). > > Setting the_virtio_vsock to NULL, should synchronize, but after a careful look > a rare issue could happen: > we are sett...
2019 May 30
2
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...>>> + * all works before to free the vsock object to avoid use after free. >>> + */ >>> + virtio_vsock_flush_works(vsock); >> >> Some questions after a quick glance: >> >> 1) It looks to me that the work could be queued from the path of >> vsock_transport_cancel_pkt() . Is that synchronized here? >> > Both virtio_transport_send_pkt() and vsock_transport_cancel_pkt() can > queue work from the upper layer (socket). > > Setting the_virtio_vsock to NULL, should synchronize, but after a careful look > a rare issue could happen: > we are sett...
2019 May 29
2
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...can be queued before 'config->del_vqs()', so we flush > + * all works before to free the vsock object to avoid use after free. > + */ > + virtio_vsock_flush_works(vsock); Some questions after a quick glance: 1) It looks to me that the work could be queued from the path of vsock_transport_cancel_pkt() . Is that synchronized here? 2) If we decide to flush after dev_vqs(), is tx_run/rx_run/event_run still needed? It looks to me we've already done except that we need flush rx_work in the end since send_pkt_work can requeue rx_work. Thanks > + > kfree(vsock); > mutex_unloc...
2019 May 29
2
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...can be queued before 'config->del_vqs()', so we flush > + * all works before to free the vsock object to avoid use after free. > + */ > + virtio_vsock_flush_works(vsock); Some questions after a quick glance: 1) It looks to me that the work could be queued from the path of vsock_transport_cancel_pkt() . Is that synchronized here? 2) If we decide to flush after dev_vqs(), is tx_run/rx_run/event_run still needed? It looks to me we've already done except that we need flush rx_work in the end since send_pkt_work can requeue rx_work. Thanks > + > kfree(vsock); > mutex_unloc...
2019 Jun 06
0
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...; > > > > + virtio_vsock_flush_works(vsock); > > > > > > > Some questions after a quick glance: > > > > > > > > > > > > > > 1) It looks to me that the work could be queued from the path of > > > > > > > vsock_transport_cancel_pkt() . Is that synchronized here? > > > > > > > > > > > > > Both virtio_transport_send_pkt() and vsock_transport_cancel_pkt() can > > > > > > queue work from the upper layer (socket). > > > > > > > > > > > >...
2019 May 29
0
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...s()', so we flush > > + * all works before to free the vsock object to avoid use after free. > > + */ > > + virtio_vsock_flush_works(vsock); > > > Some questions after a quick glance: > > 1) It looks to me that the work could be queued from the path of > vsock_transport_cancel_pkt() . Is that synchronized here? > Both virtio_transport_send_pkt() and vsock_transport_cancel_pkt() can queue work from the upper layer (socket). Setting the_virtio_vsock to NULL, should synchronize, but after a careful look a rare issue could happen: we are setting the_virtio_vsock to NULL at...
2019 May 31
0
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...> > > > > + */ > > > > > > + virtio_vsock_flush_works(vsock); > > > > > Some questions after a quick glance: > > > > > > > > > > 1) It looks to me that the work could be queued from the path of > > > > > vsock_transport_cancel_pkt() . Is that synchronized here? > > > > > > > > > Both virtio_transport_send_pkt() and vsock_transport_cancel_pkt() can > > > > queue work from the upper layer (socket). > > > > > > > > Setting the_virtio_vsock to NULL, should synchron...
2019 May 30
0
[PATCH 3/4] vsock/virtio: fix flush of works during the .remove()
...e vsock object to avoid use after free. > > > > + */ > > > > + virtio_vsock_flush_works(vsock); > > > > > > Some questions after a quick glance: > > > > > > 1) It looks to me that the work could be queued from the path of > > > vsock_transport_cancel_pkt() . Is that synchronized here? > > > > > Both virtio_transport_send_pkt() and vsock_transport_cancel_pkt() can > > queue work from the upper layer (socket). > > > > Setting the_virtio_vsock to NULL, should synchronize, but after a careful look > > a rare iss...
2016 Dec 12
3
[PATCH v4 2/4] vhost-vsock: add pkt cancel capability
To allow canceling all packets of a connection. Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com> Signed-off-by: Peng Tao <bergwolf at gmail.com> --- drivers/vhost/vsock.c | 41 +++++++++++++++++++++++++++++++++++++++++ include/net/af_vsock.h | 3 +++ 2 files changed, 44 insertions(+) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index a504e2e0..fef8808 100644 ---
2016 Dec 12
3
[PATCH v4 2/4] vhost-vsock: add pkt cancel capability
To allow canceling all packets of a connection. Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com> Signed-off-by: Peng Tao <bergwolf at gmail.com> --- drivers/vhost/vsock.c | 41 +++++++++++++++++++++++++++++++++++++++++ include/net/af_vsock.h | 3 +++ 2 files changed, 44 insertions(+) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index a504e2e0..fef8808 100644 ---
2016 Dec 08
6
[PATCH v3 2/4] vhost-vsock: add pkt cancel capability
To allow canceling all packets of a connection. Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com> Signed-off-by: Peng Tao <bergwolf at gmail.com> --- drivers/vhost/vsock.c | 41 +++++++++++++++++++++++++++++++++++++++++ include/net/af_vsock.h | 3 +++ 2 files changed, 44 insertions(+) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index a504e2e0..db64d51 100644 ---
2016 Dec 08
6
[PATCH v3 2/4] vhost-vsock: add pkt cancel capability
To allow canceling all packets of a connection. Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com> Signed-off-by: Peng Tao <bergwolf at gmail.com> --- drivers/vhost/vsock.c | 41 +++++++++++++++++++++++++++++++++++++++++ include/net/af_vsock.h | 3 +++ 2 files changed, 44 insertions(+) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index a504e2e0..db64d51 100644 ---
2017 Mar 01
5
[PATCH-v4-RESEND 0/4] vsock: cancel connect packets when failing to connect
Hi David, These patchsets were sent before and reviewed by Stefan and Jorgen [https://www.spinics.net/lists/kvm/msg142367.html]. If there is any blocker, please do tell and I'll see to it. Thanks! Currently, if a connect call fails on a signal or timeout (e.g., guest is still in the process of starting up), we'll just return to caller and leave the connect packet queued and they are sent