From: Roland Dreier Date: Thu, 15 Jan 2009 05:44:39 +0000 (-0800) Subject: IPoIB: Fix deadlock between ipoib_open() and child interface create X-Git-Tag: v2.6.29-rc3~46^2^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbbe1efa4972350286b52cb48aefaa11e198c0fb;p=pandora-kernel.git IPoIB: Fix deadlock between ipoib_open() and child interface create Fix a deadlock between child interface creation/deletion and ipoib start/stop. The former takes vlan_mutex, and then might take RTNL via register_netdev()/unregister_netdev(). The latter is executed with RTNL held, and tries to take vlan_mutex, which can lead to an AB-BA deadlock. Fix this by having the child interface creation/deletion code take the RTNL first so vlan_mutex always nests inside RTNL. We can use register_netdevice() for child interfaces because we form the interface name from the parent interface and hence don't need the '%' expansion of register_netdev(). Reported-by: Yossi Etigin Signed-off-by: Roland Dreier --- Reading git-diff-tree failed