]> git.baikalelectronics.ru Git - kernel.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)
commit0c3af1b945c4e2c311452769be4459ad9d618143
treed6f45a244de0dfe32726d5ccafaf19077e4e30ac
parent9ef33bff7c4aecd92f4505abae492ad0b91d691a
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: 620782957f98 ("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