Thadeu Lima de Souza Cascardo
5b0c275926
RDMA/cxgb4: Fix SQ allocation when on-chip SQ is disabled
Commit c079c28714e4 ("RDMA/cxgb4: Fix error handling in create_qp()")
broke SQ allocation. Instead of falling back to host allocation when
on-chip allocation fails, it tries to allocate both. And when it
does, and we try to free the address from the genpool using the host
address, we hit a BUG and the system crashes as below.
We create a new function that has the previous behavior and properly
propagate the error, as intended.
kernel BUG at /usr/src/packages/BUILD/kernel-ppc64-3.0.68/linux-3.0/lib/genalloc.c:340!
Oops: Exception in kernel mode, sig: 5 [#1]
SMP NR_CPUS=1024 NUMA pSeries
Modules linked in: rdma_ucm rdma_cm ib_addr ib_cm iw_cm ib_sa ib_mad ib_uverbs iw_cxgb4 ib_core ip6t_LOG xt_tcpudp xt_pkttype ipt_LOG xt_limit ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_raw xt_NOTRACK ipt_REJECT xt_state iptable_raw iptable_filter ip6table_mangle nf_conntrack_netbios_ns nf_conntrack_broadcast nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables ip6table_filter ip6_tables x_tables fuse loop dm_mod ipv6 ipv6_lib sr_mod cdrom ibmveth(X) cxgb4 sg ext3 jbd mbcache sd_mod crc_t10dif scsi_dh_emc scsi_dh_hp_sw scsi_dh_alua scsi_dh_rdac scsi_dh ibmvscsic(X) scsi_transport_srp scsi_tgt scsi_mod
Supported: Yes
NIP: c00000000037d41c LR: d000000003913824 CTR: c00000000037d3b0
REGS: c0000001f350ae50 TRAP: 0700 Tainted: G X (3.0.68-0.9-ppc64)
MSR: 8000000000029032 <EE,ME,CE,IR,DR> CR: 24042482 XER: 00000001
TASK = c0000001f6f2a840[3616] 'rping' THREAD: c0000001f3508000 CPU: 0
GPR00: c0000001f6e875c8 c0000001f350b0d0 c000000000fc9690 c0000001f6e875c0
GPR04: 00000000000c0000 0000000000010000 0000000000000000 c0000000009d482a
GPR08: 000000006a170000 0000000000100000 c0000001f350b140 c0000001f6e875c8
GPR12: d000000003915dd0 c000000003f40000 000000003e3ecfa8 c0000001f350bea0
GPR16: c0000001f350bcd0 00000000003c0000 0000000000040100 c0000001f6e74a80
GPR20: d00000000399a898 c0000001f6e74ac8 c0000001fad91600 c0000001f6e74ab0
GPR24: c0000001f7d23f80 0000000000000000 0000000000000002 000000006a170000
GPR28: 000000000000000c c0000001f584c8d0 d000000003925180 c0000001f6e875c8
NIP [c00000000037d41c] .gen_pool_free+0x6c/0xf8
LR [d000000003913824] .c4iw_ocqp_pool_free+0x8c/0xd8 [iw_cxgb4]
Call Trace:
[c0000001f350b0d0] [c0000001f350b180] 0xc0000001f350b180 (unreliable)
[c0000001f350b170] [d000000003913824] .c4iw_ocqp_pool_free+0x8c/0xd8 [iw_cxgb4]
[c0000001f350b210] [d00000000390fd70] .dealloc_sq+0x90/0xb0 [iw_cxgb4]
[c0000001f350b280] [d00000000390fe08] .destroy_qp+0x78/0xf8 [iw_cxgb4]
[c0000001f350b310] [d000000003912738] .c4iw_destroy_qp+0x208/0x2d0 [iw_cxgb4]
[c0000001f350b460] [d000000003861874] .ib_destroy_qp+0x5c/0x130 [ib_core]
[c0000001f350b510] [d0000000039911bc] .ib_uverbs_cleanup_ucontext+0x174/0x4f8 [ib_uverbs]
[c0000001f350b5f0] [d000000003991568] .ib_uverbs_close+0x28/0x70 [ib_uverbs]
[c0000001f350b670] [c0000000001e7b2c] .__fput+0xdc/0x278
[c0000001f350b720] [c0000000001a9590] .remove_vma+0x68/0xd8
[c0000001f350b7b0] [c0000000001a9720] .exit_mmap+0x120/0x160
[c0000001f350b8d0] [c0000000000af330] .mmput+0x80/0x160
[c0000001f350b960] [c0000000000b5d0c] .exit_mm+0x1ac/0x1e8
[c0000001f350ba10] [c0000000000b8154] .do_exit+0x1b4/0x4b8
[c0000001f350bad0] [c0000000000b84b0] .do_group_exit+0x58/0xf8
[c0000001f350bb60] [c0000000000ce9f4] .get_signal_to_deliver+0x2f4/0x5d0
[c0000001f350bc60] [c000000000017ee4] .do_signal_pending+0x6c/0x3e0
[c0000001f350bdb0] [c0000000000182cc] .do_signal+0x74/0x78
[c0000001f350be30] [c000000000009e74] do_work+0x24/0x28
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Cc: Emil Goode <emilgoode@gmail.com>
Cc: <stable@vger.kernel.org>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2013-04-16 23:01:43 -07:00
..
2013-04-05 19:29:36 -07:00
2013-03-15 17:20:02 +00:00
2013-04-03 19:48:49 -04:00
2013-02-27 19:10:24 -08:00
2013-04-09 18:03:25 +01:00
2013-03-01 13:52:03 -05:00
2013-04-09 12:05:41 -07:00
2013-03-18 15:17:11 -04:00
2013-04-01 16:17:52 -07:00
2013-04-01 11:44:38 -07:00
2013-03-03 12:06:09 -08:00
2013-02-27 13:08:35 -05:00
2013-04-08 22:09:23 +02:00
2013-02-21 15:27:22 -08:00
2013-04-05 21:02:17 +08:00
2013-02-27 19:10:15 -08:00
2013-04-11 20:35:11 -07:00
2013-03-16 06:32:30 +01:00
2013-04-01 12:02:05 -06:00
2013-03-13 17:38:57 +09:00
2013-02-27 19:10:15 -08:00
2013-03-22 20:08:01 +00:00
2013-04-11 19:01:19 +02:00
2013-04-12 14:21:12 +10:00
2013-04-04 09:49:56 +02:00
2013-03-01 13:39:00 -08:00
2013-02-27 10:15:53 -08:00
2013-03-18 21:19:49 +01:00
2013-04-05 17:45:11 +03:00
2013-04-02 15:30:41 +02:00
2013-02-26 20:16:07 -08:00
2013-02-22 19:25:09 -08:00
2013-03-06 05:48:24 +08:00
2013-04-16 23:01:43 -07:00
2013-03-18 08:17:14 -07:00
2013-03-27 09:25:11 -07:00
2013-02-21 13:57:13 -08:00
2013-03-04 17:15:33 -08:00
2013-03-17 12:01:10 -04:00
2013-02-26 09:29:02 -08:00
2013-02-26 14:49:12 -08:00
2013-02-23 17:09:55 -08:00
2013-03-04 14:23:11 +01:00
2013-04-05 15:36:34 +01:00
2013-04-04 08:40:45 -07:00
2013-02-27 19:10:23 -08:00
2013-03-15 07:42:22 +01:00
2013-04-03 11:53:39 -07:00
2013-03-03 00:32:50 +00:00
2013-03-18 08:27:41 -07:00
2013-04-10 15:27:04 -04:00
2013-04-01 00:52:42 +02:00
2013-02-21 17:40:58 -08:00
2013-03-03 19:36:31 -08:00
2013-02-26 20:16:07 -08:00
2013-02-21 17:54:03 -08:00
2013-04-03 15:54:59 -06:00
2013-02-21 17:40:58 -08:00
2013-03-24 10:11:29 -07:00
2013-03-08 16:03:29 -08:00
2013-03-04 14:23:40 +01:00
2013-02-27 19:10:18 -08:00
2013-02-27 19:10:23 -08:00
2013-02-26 09:34:29 -08:00
2013-03-05 10:12:43 +08:00
2013-04-07 15:11:27 +03:00
2013-02-27 19:10:18 -08:00
2013-04-05 09:36:53 -07:00
2013-04-08 17:16:57 -04:00
2013-02-26 20:16:07 -08:00
2013-04-11 14:17:15 -07:00
2013-04-05 10:04:41 -07:00
2013-02-22 10:07:30 +01:00
2013-03-25 11:35:38 -07:00
2013-04-11 01:48:49 -07:00
2013-03-11 23:09:29 +08:00
2013-04-08 11:30:04 -07:00
2013-02-27 19:10:19 -08:00
2013-04-02 01:25:09 +02:00
2013-03-26 11:33:16 -06:00
2013-04-12 15:26:42 -07:00
2013-04-05 09:15:46 -07:00
2013-02-26 14:49:12 -08:00
2013-03-12 16:20:46 -07:00
2013-04-14 09:09:10 +02:00
2013-04-10 15:57:33 -07:00
2013-02-22 23:31:31 -05:00
2013-02-21 13:57:13 -08:00
2013-02-23 17:09:55 -08:00