]> git.baikalelectronics.ru Git - kernel.git/commit
vsock: make listener child lock ordering explicit
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 23 Jun 2016 15:28:58 +0000 (16:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jun 2016 14:44:46 +0000 (10:44 -0400)
commita65dccc53f5c99dace1e07daebdeeb1eef7eead8
tree40510d67dd103d5a44cf345706ed92d6407da300
parent6ba46cb97fb662529193d2746e4c3d3797252365
vsock: make listener child lock ordering explicit

There are several places where the listener and pending or accept queue
child sockets are accessed at the same time.  Lockdep is unhappy that
two locks from the same class are held.

Tell lockdep that it is safe and document the lock ordering.

Originally Claudio Imbrenda <imbrenda@linux.vnet.ibm.com> sent a similar
patch asking whether this is safe.  I have audited the code and also
covered the vsock_pending_work() function.

Suggested-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/vmw_vsock/af_vsock.c