]> git.karo-electronics.de Git - linux-beck.git/commit
IB/IPoIB: Disable bottom half when dealing with device address
authorMark Bloch <markb@mellanox.com>
Sat, 4 Jun 2016 12:15:22 +0000 (15:15 +0300)
committerDoug Ledford <dledford@redhat.com>
Tue, 7 Jun 2016 13:50:54 +0000 (09:50 -0400)
commit9b29953bf8ca23944c5e00dcc15ad7bd9fecdd4e
treed6f45a244de0dfe32726d5ccafaf19077e4e30ac
parent8e787646fbce895c20c4433973e90af90e1c6a28
IB/IPoIB: Disable bottom half when dealing with device address

Align locking usage when touching device address with rest
of the kernel. Lock the bottom half when doing so using
netif_addr_lock_bh.

This also solves the following case as reported by lockdep:
CPU0                    CPU1
----                    ----
lock(_xmit_INFINIBAND);
local_irq_disable();
lock(&(&mc->mca_lock)->rlock);
lock(_xmit_INFINIBAND);
<Interrupt>
lock(&(&mc->mca_lock)->rlock);

*** DEADLOCK ***

Fixes: 492a7e67ff83 ("IB/IPoIB: Allow setting the device address")
Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/ipoib/ipoib_ib.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/ipoib/ipoib_multicast.c