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)
commit4ce5a5744a2f5479e58c6788cbe3987b8071b62e
tree0961920538c9cfd956e2c62ff408f78bfa14738f
parentacc4fccf4eff5b29e545995b75de77e60ea44aae
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