linux-hardened/drivers/net/ethernet/mellanox/mlx4
Yevgeny Petrilin 730c41d5ba 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>
2012-02-21 15:27:23 -05:00
..
alloc.c
catas.c mlx4_core: adjust catas operation for SRIOV mode 2011-12-13 13:56:08 -05:00
cmd.c mlx4_core: fix memory leak at multi_func_cleanup 2012-02-06 12:10:11 -05:00
cq.c mlx4_core: removed function index from vf. 2012-01-22 15:08:43 -05:00
en_cq.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-01-02 18:56:49 -05:00
en_ethtool.c mlx4_en: eth statistics modification 2012-01-22 15:08:43 -05:00
en_main.c mlx4_en: set number of rx rings used by RSS using ethtool 2012-01-18 16:07:34 -05:00
en_netdev.c mlx4: allow device removal by fixing dma unmap size 2012-02-06 14:42:28 -05:00
en_port.c mlx4: Ethernet port management modifications 2011-12-13 13:56:07 -05:00
en_port.h mlx4: Ethernet port management modifications 2011-12-13 13:56:07 -05:00
en_resources.c net/mlx4: move RSS related definitions to be global 2011-11-27 17:17:03 -05:00
en_rx.c mlx4: fix DMA mapping leak when allocation fails 2012-02-06 14:42:28 -05:00
en_selftest.c mlx4_core: Add "native" argument to mlx4_cmd and its callers (where needed) 2011-12-13 13:56:05 -05:00
en_tx.c mlx4_en: Allow communication between functions on same host 2011-12-13 13:56:07 -05:00
eq.c mlx4: Replacing pool_lock with mutex 2012-02-21 15:27:23 -05:00
fw.c mlx4_core: removed function index from vf. 2012-01-22 15:08:43 -05:00
fw.h mlx4_core: removed function index from vf. 2012-01-22 15:08:43 -05:00
icm.c mlx4_core: Add "native" argument to mlx4_cmd and its callers (where needed) 2011-12-13 13:56:05 -05:00
icm.h
intf.c mlx4_core: adjust catas operation for SRIOV mode 2011-12-13 13:56:08 -05:00
Kconfig
main.c mlx4: Replacing pool_lock with mutex 2012-02-21 15:27:23 -05:00
Makefile mlx4_core: resource tracking for HCA resources used by guests 2011-12-13 13:56:07 -05:00
mcg.c mlx4_core: use correct port for steering 2012-02-06 12:10:11 -05:00
mlx4.h mlx4: Replacing pool_lock with mutex 2012-02-21 15:27:23 -05:00
mlx4_en.h mlx4: allow device removal by fixing dma unmap size 2012-02-06 14:42:28 -05:00
mr.c mlx4_core: removed function index from vf. 2012-01-22 15:08:43 -05:00
pd.c mlx4_core: removed function index from vf. 2012-01-22 15:08:43 -05:00
port.c mlx4_en: eth statistics modification 2012-01-22 15:08:43 -05:00
profile.c mlx4_core: Fix mtt profile issue 2012-01-22 15:08:44 -05:00
qp.c mlx4_core: removed function index from vf. 2012-01-22 15:08:43 -05:00
reset.c
resource_tracker.c mlx4: add unicast steering entries to resource_tracker 2012-02-15 14:50:16 -05:00
sense.c mlx4_core: Add "native" argument to mlx4_cmd and its callers (where needed) 2011-12-13 13:56:05 -05:00
srq.c mlx4_core: removed function index from vf. 2012-01-22 15:08:43 -05:00