From: Andy King Date: Mon, 18 Feb 2013 06:04:13 +0000 (+0000) Subject: VSOCK: Don't reject PF_VSOCK protocol X-Git-Tag: MMI-PSA29.97-13-9~15013^2~32 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6cf1c5fc26c6507bcb0edced6fcda876a79b5a6d;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git VSOCK: Don't reject PF_VSOCK protocol Allow our own family as the protocol value for socket creation. Reported-by: Gerd Hoffmann Signed-off-by: Andy King Signed-off-by: David S. Miller --- diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index c1b9e55e338e..ca511c4f388a 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1860,7 +1860,7 @@ static int vsock_create(struct net *net, struct socket *sock, if (!sock) return -EINVAL; - if (protocol) + if (protocol && protocol != PF_VSOCK) return -EPROTONOSUPPORT; switch (sock->type) {