Skip to content

Commit

Permalink
VSOCK: Detach QP check should filter out non matching QPs.
Browse files Browse the repository at this point in the history
The check in vmci_transport_peer_detach_cb should only allow a
detach when the qp handle of the transport matches the one in
the detach message.

Testing: Before this change, a detach from a peer on a different
socket would cause an active stream socket to register a detach.

Reviewed-by: George Zhang <georgezhang@vmware.com>
Signed-off-by: Jorgen Hansen <jhansen@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jorgen Hansen authored and David S. Miller committed Apr 6, 2016
1 parent 52f95bb commit 8ab18d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/vmw_vsock/vmci_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -2154,7 +2154,7 @@ module_exit(vmci_transport_exit);

MODULE_AUTHOR("VMware, Inc.");
MODULE_DESCRIPTION("VMCI transport for Virtual Sockets");
MODULE_VERSION("1.0.2.0-k");
MODULE_VERSION("1.0.3.0-k");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("vmware_vsock");
MODULE_ALIAS_NETPROTO(PF_VSOCK);

0 comments on commit 8ab18d7

Please sign in to comment.