]> 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)
commit09dd3becc1f18c209853bf3d5a0c73ead52e461b
tree40510d67dd103d5a44cf345706ed92d6407da300
parentb45a9c1557f98aaf4474993882b47f77b143dd81
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