diff options
author | Faisal Latif <faisal.latif@intel.com> | 2010-05-21 17:55:03 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-05-25 00:12:54 -0400 |
commit | df02902313feb1472bc6ec16e486f72b39e9d4b2 (patch) | |
tree | 6cb761596855ce1c34f0314e6e4139f8a75198d0 /drivers/infiniband/hw/nes | |
parent | 39942a028c559e39495ae7b29a8dd9b0c3c03003 (diff) |
RDMA/nes: Async event for closed QP causes crash
Under abnormal termination, modify_qp() closes the QP, and async event
(AE) handling also attempts to close the same QP, causing a crash.
Fix this by checking the state of the QP before processing the AE.
Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_hw.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index 86acb7d57064..bb9c77504fe2 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c | |||
@@ -3422,6 +3422,7 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, | |||
3422 | struct nes_adapter *nesadapter = nesdev->nesadapter; | 3422 | struct nes_adapter *nesadapter = nesdev->nesadapter; |
3423 | u32 aeq_info; | 3423 | u32 aeq_info; |
3424 | u32 next_iwarp_state = 0; | 3424 | u32 next_iwarp_state = 0; |
3425 | u32 aeqe_cq_id; | ||
3425 | u16 async_event_id; | 3426 | u16 async_event_id; |
3426 | u8 tcp_state; | 3427 | u8 tcp_state; |
3427 | u8 iwarp_state; | 3428 | u8 iwarp_state; |
@@ -3449,6 +3450,14 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, | |||
3449 | le32_to_cpu(aeqe->aeqe_words[NES_AEQE_COMP_QP_CQ_ID_IDX]), aeqe, | 3450 | le32_to_cpu(aeqe->aeqe_words[NES_AEQE_COMP_QP_CQ_ID_IDX]), aeqe, |
3450 | nes_tcp_state_str[tcp_state], nes_iwarp_state_str[iwarp_state]); | 3451 | nes_tcp_state_str[tcp_state], nes_iwarp_state_str[iwarp_state]); |
3451 | 3452 | ||
3453 | aeqe_cq_id = le32_to_cpu(aeqe->aeqe_words[NES_AEQE_COMP_QP_CQ_ID_IDX]); | ||
3454 | if (aeq_info & NES_AEQE_QP) { | ||
3455 | if ((!nes_is_resource_allocated(nesadapter, nesadapter->allocated_qps, | ||
3456 | aeqe_cq_id)) || | ||
3457 | (atomic_read(&nesqp->close_timer_started))) | ||
3458 | return; | ||
3459 | } | ||
3460 | |||
3452 | switch (async_event_id) { | 3461 | switch (async_event_id) { |
3453 | case NES_AEQE_AEID_LLP_FIN_RECEIVED: | 3462 | case NES_AEQE_AEID_LLP_FIN_RECEIVED: |
3454 | if (nesqp->term_flags) | 3463 | if (nesqp->term_flags) |