]> git.baikalelectronics.ru Git - kernel.git/commit
xen-netfront: don't nest queue locks in xennet_connect()
authorDavid Vrabel <david.vrabel@citrix.com>
Wed, 2 Jul 2014 15:09:14 +0000 (16:09 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jul 2014 18:21:03 +0000 (11:21 -0700)
commit6167d10909da6a479c65f196c792556f7f168654
tree83856002d96da7aacba68de416ca34e44169b894
parentfa97cf1cd1bf5b87a900fd5d7260af660c6fddb5
xen-netfront: don't nest queue locks in xennet_connect()

The nesting of the per-queue rx_lock and tx_lock in xennet_connect()
is confusing to both humans and lockdep.  The locking is safe because
this is the only place where the locks are nested in this way but
lockdep still warns.

Instead of adding the missing lockdep annotations, refactor the
locking to avoid the confusing nesting.  This is still safe, because
the xenbus connection state changes are all serialized by the xenwatch
thread.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netfront.c