diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2012-02-20 22:39:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-21 15:27:23 -0500 |
commit | 730c41d5ba583a9608300fc4e6cf236957cfe02a (patch) | |
tree | 5b0592c70a8f5d247fa0541dc26e3a8e2cc01844 /drivers/net/ethernet/mellanox/mlx4/main.c | |
parent | 15103aa7a033d7d671c75cc3a71d772dbcbae61e (diff) |
mlx4: Replacing pool_lock with mutex
Under the spinlock we call request_irq(), which allocates memory with GFP_KERNEL,
This causes the following trace when DEBUG_SPINLOCK is enabled, it can cause
the following trace:
BUG: spinlock wrong CPU on CPU#2, ethtool/2595
lock: ffff8801f9cbc2b0, .magic: dead4ead, .owner: ethtool/2595, .owner_cpu: 0
Pid: 2595, comm: ethtool Not tainted 3.0.18 #2
Call Trace:
spin_bug+0xa2/0xf0
do_raw_spin_unlock+0x71/0xa0
_raw_spin_unlock+0xe/0x10
mlx4_assign_eq+0x12b/0x190 [mlx4_core]
mlx4_en_activate_cq+0x252/0x2d0 [mlx4_en]
? mlx4_en_activate_rx_rings+0x227/0x370 [mlx4_en]
mlx4_en_start_port+0x189/0xb90 [mlx4_en]
mlx4_en_set_ringparam+0x29a/0x340 [mlx4_en]
dev_ethtool+0x816/0xb10
? dev_get_by_name_rcu+0xa4/0xe0
dev_ioctl+0x2b5/0x470
handle_mm_fault+0x1cd/0x2d0
sock_do_ioctl+0x5d/0x70
sock_ioctl+0x79/0x2f0
do_vfs_ioctl+0x8c/0x340
sys_ioctl+0xa1/0xb0
system_call_fastpath+0x16/0x1b
Replacing with mutex, which is enough in this case.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/main.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 9c5fbad513f8..5c655a2a3809 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c | |||
@@ -1828,7 +1828,7 @@ slave_start: | |||
1828 | goto err_master_mfunc; | 1828 | goto err_master_mfunc; |
1829 | 1829 | ||
1830 | priv->msix_ctl.pool_bm = 0; | 1830 | priv->msix_ctl.pool_bm = 0; |
1831 | spin_lock_init(&priv->msix_ctl.pool_lock); | 1831 | mutex_init(&priv->msix_ctl.pool_lock); |
1832 | 1832 | ||
1833 | mlx4_enable_msi_x(dev); | 1833 | mlx4_enable_msi_x(dev); |
1834 | if ((mlx4_is_mfunc(dev)) && | 1834 | if ((mlx4_is_mfunc(dev)) && |