Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/mlx4_core: Fix lockdep warning in mac/vlan register/unregister/re…
…place functions In the mac and vlan register/unregister/replace functions, the driver locks the mac table mutex (or vlan table mutex) on both ports. Use mutex_lock_nested() to prevent warnings, such as the one below. [ 101.828445] ============================================= [ 101.834820] [ INFO: possible recursive locking detected ] [ 101.841199] 4.5.0-rc2-cmpn_stream_dbg-vm_2016_02_22-14_48_g759ca5d torvalds#49 Not tainted [ 101.850251] --------------------------------------------- [ 101.856621] modprobe/3054 is trying to acquire lock: [ 101.862514] (&table->mutex#2){+.+.+.}, at: [<ffffffffa079c10e>] __mlx4_register_mac+0x87e/0xa90 [mlx4_core] [ 101.874598] [ 101.874598] but task is already holding lock: [ 101.881703] (&table->mutex#2){+.+.+.}, at: [<ffffffffa079c0f0>] __mlx4_register_mac+0x860/0xa90 [mlx4_core] [ 101.893776] [ 101.893776] other info that might help us debug this: [ 101.901658] Possible unsafe locking scenario: [ 101.901658] [ 101.908859] CPU0 [ 101.911923] ---- [ 101.914985] lock(&table->mutex#2); [ 101.919595] lock(&table->mutex#2); [ 101.924199] [ 101.924199] * DEADLOCK * [ 101.924199] [ 101.931643] May be due to missing lock nesting notation This fix used here is the same as the one used by Haggai Eran in commit 31b57b8 ("IB/ucma: Fix lockdep warning in ucma_lock_files"). issue: 736271 Change-Id: Ic74edc755ef8c7d15bd96a122aa484f9b442cce4 Fixes: 5f61385 ("net/mlx4_core: Keep VLAN/MAC tables mirrored in multifunc HA mode") Suggested-by: Doron Tsur <[email protected]> Signed-off-by: Jack Morgenstein <[email protected]>
- Loading branch information