Displaying 20 results from an estimated 23 matches for "vmci_handle_is_invalid".
2015 Oct 21
1
[PATCH] VSOCK: sock_put wasn't safe to call in interrupt context
...struct vmci_event_data *e_data,
void *client_data)
{
- struct sock *sk = client_data;
+ struct vmci_transport *trans = client_data;
const struct vmci_event_payload_qp *e_payload;
- struct vsock_sock *vsk;
e_payload = vmci_event_data_const_payload(e_data);
- vsk = vsock_sk(sk);
- if (vmci_handle_is_invalid(e_payload->handle))
- return;
-
- /* Same rules for locking as for peer_attach_cb(). */
- local_bh_disable();
- bh_lock_sock(sk);
/* XXX This is lame, we should provide a way to lookup sockets by
* qp_handle.
*/
- if (vmci_handle_is_equal(vmci_trans(vsk)->qp_handle,
- e_payload...
2015 Oct 21
1
[PATCH] VSOCK: sock_put wasn't safe to call in interrupt context
...struct vmci_event_data *e_data,
void *client_data)
{
- struct sock *sk = client_data;
+ struct vmci_transport *trans = client_data;
const struct vmci_event_payload_qp *e_payload;
- struct vsock_sock *vsk;
e_payload = vmci_event_data_const_payload(e_data);
- vsk = vsock_sk(sk);
- if (vmci_handle_is_invalid(e_payload->handle))
- return;
-
- /* Same rules for locking as for peer_attach_cb(). */
- local_bh_disable();
- bh_lock_sock(sk);
/* XXX This is lame, we should provide a way to lookup sockets by
* qp_handle.
*/
- if (vmci_handle_is_equal(vmci_trans(vsk)->qp_handle,
- e_payload...
2016 Apr 05
0
[PATCH] VSOCK: Detach QP check should filter out non matching QPs.
...2 deletions(-)
diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
index 0a369bb..662bdd2 100644
--- a/net/vmw_vsock/vmci_transport.c
+++ b/net/vmw_vsock/vmci_transport.c
@@ -842,7 +842,7 @@ static void vmci_transport_peer_detach_cb(u32 sub_id,
* qp_handle.
*/
if (vmci_handle_is_invalid(e_payload->handle) ||
- vmci_handle_is_equal(trans->qp_handle, e_payload->handle))
+ !vmci_handle_is_equal(trans->qp_handle, e_payload->handle))
return;
/* We don't ask for delayed CBs when we subscribe to this event (we
@@ -2154,7 +2154,7 @@ module_exit(vmci_trans...
2016 Oct 06
0
[PATCH] VMCI: Doorbell create and destroy fixes
...etions(-)
diff --git a/drivers/misc/vmw_vmci/vmci_doorbell.c b/drivers/misc/vmw_vmci/vmci_doorbell.c
index a8cee33..b3fa738 100644
--- a/drivers/misc/vmw_vmci/vmci_doorbell.c
+++ b/drivers/misc/vmw_vmci/vmci_doorbell.c
@@ -431,6 +431,12 @@ int vmci_doorbell_create(struct vmci_handle *handle,
if (vmci_handle_is_invalid(*handle)) {
u32 context_id = vmci_get_context_id();
+ if (context_id == VMCI_INVALID_ID) {
+ pr_warn("Failed to get context ID\n");
+ result = VMCI_ERROR_NO_RESOURCES;
+ goto free_mem;
+ }
+
/* Let resource code allocate a free ID for us */
new_handle = vmci_make_handle...
2016 Apr 05
0
[PATCH] VSOCK: Detach QP check should filter out non matching QPs.
...2 deletions(-)
diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
index 0a369bb..662bdd2 100644
--- a/net/vmw_vsock/vmci_transport.c
+++ b/net/vmw_vsock/vmci_transport.c
@@ -842,7 +842,7 @@ static void vmci_transport_peer_detach_cb(u32 sub_id,
* qp_handle.
*/
if (vmci_handle_is_invalid(e_payload->handle) ||
- vmci_handle_is_equal(trans->qp_handle, e_payload->handle))
+ !vmci_handle_is_equal(trans->qp_handle, e_payload->handle))
return;
/* We don't ask for delayed CBs when we subscribe to this event (we
@@ -2154,7 +2154,7 @@ module_exit(vmci_trans...
2016 Oct 06
0
[PATCH] VMCI: Doorbell create and destroy fixes
...etions(-)
diff --git a/drivers/misc/vmw_vmci/vmci_doorbell.c b/drivers/misc/vmw_vmci/vmci_doorbell.c
index a8cee33..b3fa738 100644
--- a/drivers/misc/vmw_vmci/vmci_doorbell.c
+++ b/drivers/misc/vmw_vmci/vmci_doorbell.c
@@ -431,6 +431,12 @@ int vmci_doorbell_create(struct vmci_handle *handle,
if (vmci_handle_is_invalid(*handle)) {
u32 context_id = vmci_get_context_id();
+ if (context_id == VMCI_INVALID_ID) {
+ pr_warn("Failed to get context ID\n");
+ result = VMCI_ERROR_NO_RESOURCES;
+ goto free_mem;
+ }
+
/* Let resource code allocate a free ID for us */
new_handle = vmci_make_handle...
2013 Jan 08
13
[PATCH 00/12] VMCI for Linux upstreaming
* * *
This series of VMCI linux upstreaming patches include latest udpate from
VMware to address Greg's and all other's code review comments.
Summary of changes:
- Rebase our linux kernel tree from v3.5 to v3.7.
- Fix all checkpatch warnings and errors. Fix some checkpatch with -strict
errors.
This addresses Greg's comment: On 15 Nov 2012
2013 Jan 08
13
[PATCH 00/12] VMCI for Linux upstreaming
* * *
This series of VMCI linux upstreaming patches include latest udpate from
VMware to address Greg's and all other's code review comments.
Summary of changes:
- Rebase our linux kernel tree from v3.5 to v3.7.
- Fix all checkpatch warnings and errors. Fix some checkpatch with -strict
errors.
This addresses Greg's comment: On 15 Nov 2012
2013 Jan 25
4
[PATCH 0/1] VM Sockets for Linux upstreaming
From: Andy King <acking at vmware.com>
** Introduce VM Sockets ***
In an effort to improve the out-of-the-box experience with Linux kernels for
VMware users, VMware is working on readying the VM Sockets (VSOCK, formerly
VMCI Sockets) (vmw_vsock) kernel module for inclusion in the Linux kernel. The
purpose of this post is to acquire feedback on the vmw_vsock kernel module.
Unlike previous
2013 Jan 25
4
[PATCH 0/1] VM Sockets for Linux upstreaming
From: Andy King <acking at vmware.com>
** Introduce VM Sockets ***
In an effort to improve the out-of-the-box experience with Linux kernels for
VMware users, VMware is working on readying the VM Sockets (VSOCK, formerly
VMCI Sockets) (vmw_vsock) kernel module for inclusion in the Linux kernel. The
purpose of this post is to acquire feedback on the vmw_vsock kernel module.
Unlike previous
2019 May 24
0
[PATCH] VMCI: Fix integer overflow in VMCI handle arrays
...dst_context->host_context.wait_queue);
+ }
+ } else {
+ result = VMCI_SUCCESS;
}
- result = VMCI_SUCCESS;
}
spin_unlock(&dst_context->lock);
}
@@ -1126,13 +1138,11 @@ int vmci_ctx_qp_create(struct vmci_ctx *context, struct vmci_handle handle)
if (context == NULL || vmci_handle_is_invalid(handle))
return VMCI_ERROR_INVALID_ARGS;
- if (!vmci_handle_arr_has_entry(context->queue_pair_array, handle)) {
- vmci_handle_arr_append_entry(&context->queue_pair_array,
- handle);
- result = VMCI_SUCCESS;
- } else {
+ if (!vmci_handle_arr_has_entry(context->queue_pair...
2013 Jan 08
7
[PATCH 0/6] VSOCK for Linux upstreaming
* * *
This series of VSOCK linux upstreaming patches include latest udpate from
VMware to address Greg's and all other's code review comments.
Summary of changes:
- Rebase our linux kernel tree from v3.5 to v3.7.
- Fix all checkpatch warnings and errors. Fix some checkpatch with -strict
errors.
This addresses Greg's comment: On 15 Nov 2012
2013 Jan 08
7
[PATCH 0/6] VSOCK for Linux upstreaming
* * *
This series of VSOCK linux upstreaming patches include latest udpate from
VMware to address Greg's and all other's code review comments.
Summary of changes:
- Rebase our linux kernel tree from v3.5 to v3.7.
- Fix all checkpatch warnings and errors. Fix some checkpatch with -strict
errors.
This addresses Greg's comment: On 15 Nov 2012
2019 Oct 30
1
[PATCH net-next 07/14] vsock: handle buffer_size sockopts in the core
...ze,
> + err = vmci_transport_send_conn_request2(sk, vsk-
> >buffer_size,
> supported_proto_versions);
> if (err < 0) {
> sk->sk_state = TCP_CLOSE;
> @@ -1876,46 +1854,6 @@ static bool
> vmci_transport_stream_is_active(struct vsock_sock *vsk)
> return !vmci_handle_is_invalid(vmci_trans(vsk)->qp_handle);
> }
>
> -static u64 vmci_transport_get_buffer_size(struct vsock_sock *vsk) -{
> - return vmci_trans(vsk)->queue_pair_size;
> -}
> -
> -static u64 vmci_transport_get_min_buffer_size(struct vsock_sock *vsk) -{
> - return vmci_trans(vsk)->...
2019 Sep 27
0
[RFC PATCH 07/13] vsock: handle buffer_size sockopts in the core
...sk, vmci_trans(vsk)->queue_pair_size,
+ err = vmci_transport_send_conn_request2(sk, vsk->buffer_size,
supported_proto_versions);
if (err < 0) {
sk->sk_state = TCP_CLOSE;
@@ -1876,46 +1854,6 @@ static bool vmci_transport_stream_is_active(struct vsock_sock *vsk)
return !vmci_handle_is_invalid(vmci_trans(vsk)->qp_handle);
}
-static u64 vmci_transport_get_buffer_size(struct vsock_sock *vsk)
-{
- return vmci_trans(vsk)->queue_pair_size;
-}
-
-static u64 vmci_transport_get_min_buffer_size(struct vsock_sock *vsk)
-{
- return vmci_trans(vsk)->queue_pair_min_size;
-}
-
-static u64...
2019 Oct 23
0
[PATCH net-next 07/14] vsock: handle buffer_size sockopts in the core
...sk, vmci_trans(vsk)->queue_pair_size,
+ err = vmci_transport_send_conn_request2(sk, vsk->buffer_size,
supported_proto_versions);
if (err < 0) {
sk->sk_state = TCP_CLOSE;
@@ -1876,46 +1854,6 @@ static bool vmci_transport_stream_is_active(struct vsock_sock *vsk)
return !vmci_handle_is_invalid(vmci_trans(vsk)->qp_handle);
}
-static u64 vmci_transport_get_buffer_size(struct vsock_sock *vsk)
-{
- return vmci_trans(vsk)->queue_pair_size;
-}
-
-static u64 vmci_transport_get_min_buffer_size(struct vsock_sock *vsk)
-{
- return vmci_trans(vsk)->queue_pair_min_size;
-}
-
-static u64...
2019 Oct 23
33
[PATCH net-next 00/14] vsock: add multi-transports support
This series adds the multi-transports support to vsock, following
this proposal: https://www.spinics.net/lists/netdev/msg575792.html
With the multi-transports support, we can use VSOCK with nested VMs
(using also different hypervisors) loading both guest->host and
host->guest transports at the same time.
Before this series, vmci-transport supported this behavior but only
using VMware
2019 Oct 23
33
[PATCH net-next 00/14] vsock: add multi-transports support
This series adds the multi-transports support to vsock, following
this proposal: https://www.spinics.net/lists/netdev/msg575792.html
With the multi-transports support, we can use VSOCK with nested VMs
(using also different hypervisors) loading both guest->host and
host->guest transports at the same time.
Before this series, vmci-transport supported this behavior but only
using VMware
2016 Jul 28
6
[RFC v6 0/6] Add virtio transport for AF_VSOCK
This series is based on v4.7.
This RFC is the implementation for the new VIRTIO Socket device. It is
developed in parallel with the VIRTIO device specification and proves the
design. Once the specification has been accepted I will send a non-RFC version
of this patch series.
v6:
* Add VHOST_VSOCK_SET_RUNNING ioctl to start/stop vhost cleanly
* Add graceful shutdown to avoid port reuse while
2016 Jul 28
6
[RFC v6 0/6] Add virtio transport for AF_VSOCK
This series is based on v4.7.
This RFC is the implementation for the new VIRTIO Socket device. It is
developed in parallel with the VIRTIO device specification and proves the
design. Once the specification has been accepted I will send a non-RFC version
of this patch series.
v6:
* Add VHOST_VSOCK_SET_RUNNING ioctl to start/stop vhost cleanly
* Add graceful shutdown to avoid port reuse while