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)
commitf50b407653f64e76d1c9abda61d0d85cde3ca9ca
tree83856002d96da7aacba68de416ca34e44169b894
parent6e08d5e3c8236e7484229e46fdf92006e1dd4c49
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