Skip to content

Commit 9f7b16a

Browse files
Andrew Boyerdledford
authored andcommitted
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: 4e9042e ("i40iw: add hw and utils files") Signed-off-by: Andrew Boyer <[email protected]> Reviewed-by: Shiraz Saleem <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent a75895b commit 9f7b16a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/infiniband/hw/i40iw/i40iw_hw.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ void i40iw_process_aeq(struct i40iw_device *iwdev)
331331
switch (info->ae_id) {
332332
case I40IW_AE_LLP_FIN_RECEIVED:
333333
if (qp->term_flags)
334-
continue;
334+
break;
335335
if (atomic_inc_return(&iwqp->close_timer_started) == 1) {
336336
iwqp->hw_tcp_state = I40IW_TCP_STATE_CLOSE_WAIT;
337337
if ((iwqp->hw_tcp_state == I40IW_TCP_STATE_CLOSE_WAIT) &&
@@ -360,7 +360,7 @@ void i40iw_process_aeq(struct i40iw_device *iwdev)
360360
break;
361361
case I40IW_AE_LLP_CONNECTION_RESET:
362362
if (atomic_read(&iwqp->close_timer_started))
363-
continue;
363+
break;
364364
i40iw_cm_disconn(iwqp);
365365
break;
366366
case I40IW_AE_QP_SUSPEND_COMPLETE:

0 commit comments

Comments
 (0)