diff options
author | Andrew Boyer <andrew.boyer@dell.com> | 2018-05-07 13:23:37 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-05-09 10:45:18 -0400 |
commit | 9f7b16afab9b47de471f4ef6a0c6c337f0a53566 (patch) | |
tree | 1955cf9601917996d43fee7f2e3db8c0689e3744 | |
parent | a75895b1ebd944a7873cbf76d30de8720955f8b3 (diff) |
RDMA/i40iw: Avoid reference leaks when processing the AEQ
In this switch there is a reference held on the QP. 'continue' will grab
the next event without releasing the reference, causing a leak.
Change it to 'break' to drop the reference before grabbing the next event.
Fixes: 4e9042e647ff ("i40iw: add hw and utils files")
Signed-off-by: Andrew Boyer <andrew.boyer@dell.com>
Reviewed-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/hw/i40iw/i40iw_hw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_hw.c b/drivers/infiniband/hw/i40iw/i40iw_hw.c index 6139836fb533..c9f62ca7643c 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_hw.c +++ b/drivers/infiniband/hw/i40iw/i40iw_hw.c | |||
@@ -331,7 +331,7 @@ void i40iw_process_aeq(struct i40iw_device *iwdev) | |||
331 | switch (info->ae_id) { | 331 | switch (info->ae_id) { |
332 | case I40IW_AE_LLP_FIN_RECEIVED: | 332 | case I40IW_AE_LLP_FIN_RECEIVED: |
333 | if (qp->term_flags) | 333 | if (qp->term_flags) |
334 | continue; | 334 | break; |
335 | if (atomic_inc_return(&iwqp->close_timer_started) == 1) { | 335 | if (atomic_inc_return(&iwqp->close_timer_started) == 1) { |
336 | iwqp->hw_tcp_state = I40IW_TCP_STATE_CLOSE_WAIT; | 336 | iwqp->hw_tcp_state = I40IW_TCP_STATE_CLOSE_WAIT; |
337 | if ((iwqp->hw_tcp_state == I40IW_TCP_STATE_CLOSE_WAIT) && | 337 | if ((iwqp->hw_tcp_state == I40IW_TCP_STATE_CLOSE_WAIT) && |
@@ -360,7 +360,7 @@ void i40iw_process_aeq(struct i40iw_device *iwdev) | |||
360 | break; | 360 | break; |
361 | case I40IW_AE_LLP_CONNECTION_RESET: | 361 | case I40IW_AE_LLP_CONNECTION_RESET: |
362 | if (atomic_read(&iwqp->close_timer_started)) | 362 | if (atomic_read(&iwqp->close_timer_started)) |
363 | continue; | 363 | break; |
364 | i40iw_cm_disconn(iwqp); | 364 | i40iw_cm_disconn(iwqp); |
365 | break; | 365 | break; |
366 | case I40IW_AE_QP_SUSPEND_COMPLETE: | 366 | case I40IW_AE_QP_SUSPEND_COMPLETE: |