]> git.baikalelectronics.ru Git - kernel.git/commit
VSOCK: Fix VSOCK_HASH and VSOCK_CONN_HASH
authorAsias He <asias@redhat.com>
Thu, 20 Jun 2013 09:20:33 +0000 (17:20 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Jun 2013 06:51:48 +0000 (23:51 -0700)
commit051f38c3ebbe1e0a4d81e9a481b22279328bafe4
treee10f8f64fc4b4d90c0c7c1d5507890f1b87f3e86
parentd883e156913e2220d0b9170b1024da5233235a7e
VSOCK: Fix VSOCK_HASH and VSOCK_CONN_HASH

If we mod with VSOCK_HASH_SIZE -1, we get 0, 1, .... 249.  Actually, we
have vsock_bind_table[0 ... 250] and vsock_connected_table[0 .. 250].
In this case the last entry will never be used.

We should mod with VSOCK_HASH_SIZE instead.

Signed-off-by: Asias He <asias@redhat.com>
Acked-by: Andy King <acking@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/vmw_vsock/af_vsock.c