mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 19:21:26 +00:00
ib_srpt: Destroy SRQ before freeing the buffers posted on the SRQ
This commit is contained in:
@@ -4484,11 +4484,11 @@ out:
|
||||
err_cm:
|
||||
ib_destroy_cm_id(sdev->cm_id);
|
||||
err_ring:
|
||||
if (sdev->use_srq)
|
||||
ib_destroy_srq(sdev->srq);
|
||||
srpt_free_ioctx_ring((struct srpt_ioctx **)sdev->ioctx_ring, sdev,
|
||||
sdev->srq_size, srp_max_req_size,
|
||||
DMA_FROM_DEVICE);
|
||||
if (sdev->use_srq)
|
||||
ib_destroy_srq(sdev->srq);
|
||||
err_mr:
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
||||
ib_dereg_mr(sdev->mr);
|
||||
@@ -4559,12 +4559,10 @@ static void srpt_remove_one(struct ib_device *device, void *client_data)
|
||||
}
|
||||
}
|
||||
|
||||
srpt_free_ioctx_ring((struct srpt_ioctx **)sdev->ioctx_ring, sdev,
|
||||
sdev->srq_size, srp_max_req_size, DMA_FROM_DEVICE);
|
||||
sdev->ioctx_ring = NULL;
|
||||
|
||||
if (sdev->use_srq)
|
||||
ib_destroy_srq(sdev->srq);
|
||||
srpt_free_ioctx_ring((struct srpt_ioctx **)sdev->ioctx_ring, sdev,
|
||||
sdev->srq_size, srp_max_req_size, DMA_FROM_DEVICE);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
||||
ib_dereg_mr(sdev->mr);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user