]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx4: Move rtnl locking to the right place
authorMoni Shoua <monis@mellanox.co.il>
Wed, 5 Feb 2014 13:12:59 +0000 (15:12 +0200)
committerRoland Dreier <roland@purestorage.com>
Thu, 13 Feb 2014 22:31:08 +0000 (14:31 -0800)
commitcd5bbe7c36fd4d96c6ef7d7e90d7eae8e56dfae4
tree0961920538c9cfd956e2c62ff408f78bfa14738f
parent25c964b7e1c3e1c0298671109b200773d34a7236
IB/mlx4: Move rtnl locking to the right place

On the one hand, the invocation of netdev_master_upper_dev_get()
within mlx4_ib_scan_netdevs() must be done with rtnl lock held.  On
the other hand, it's wrong to call rtnl_lock() from within this
function since it's also called by our netdev notifier callback.
Therefore move the locking to mlx4_ib_add() so that both cases are
covered.

Signed-off-by: Moni Shoua <monis@mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx4/main.c