]> git.karo-electronics.de Git - karo-tx-linux.git/commit
IB/mlx4: Fix spinlock order to avoid lockdep warnings
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Tue, 27 Nov 2012 16:24:29 +0000 (16:24 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 16:45:57 +0000 (08:45 -0800)
commitaa538df256f8b65e707a30ece2548f1cd555e78a
treec733714207aa3cb1df4a28fbf38c5387f6d0a582
parent40e76e0a9e3211830067cfb248f27a91c48bee57
IB/mlx4: Fix spinlock order to avoid lockdep warnings

commit ceb7decb366591e9b67d70832e07f5d240572a3d upstream.

lockdep warns about taking a hard-irq-unsafe lock (sriov->id_map_lock)
inside a hard-irq-safe lock (sriov->going_down_lock).

Since id_map_lock is never taken in the interrupt context, we can
simply reverse the order of taking the two spinlocks, thus avoiding
the warning and the depencency.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx4/cm.c