RDMA/vmw_pvrdma: Free SRQ only once
diff mbox series

Message ID 1568848066-12449-1-git-send-email-aditr@vmware.com
State Mainlined
Commit 18545e8b6871d21aa3386dc42867138da9948a33
Delegated to: Jason Gunthorpe
Headers show
Series
  • RDMA/vmw_pvrdma: Free SRQ only once
Related show

Commit Message

Adit Ranadive Sept. 18, 2019, 11:08 p.m. UTC
An extra kfree cleanup was missed since these are now deallocated
by core.

Cc: <stable@vger.kernel.org>
Fixes: 68e326dea1db ("RDMA: Handle SRQ allocations by IB/core")
Signed-off-by: Adit Ranadive <aditr@vmware.com>
---
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Vishnu Dasa Sept. 19, 2019, 10:50 p.m. UTC | #1
On 9/18/19, 4:08 PM, "Adit Ranadive" <aditr@vmware.com> wrote:

>An extra kfree cleanup was missed since these are now deallocated
>by core.
>
>Cc: <stable@vger.kernel.org>
>Fixes: 68e326dea1db ("RDMA: Handle SRQ allocations by IB/core")
>Signed-off-by: Adit Ranadive <aditr@vmware.com>
>---
> drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c | 2 --
> 1 file changed, 2 deletions(-)
>
>diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c
>index 6cac0c88cf39..36cdfbdbd325 100644
>--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c
>+++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c
>@@ -230,8 +230,6 @@ static void pvrdma_free_srq(struct pvrdma_dev *dev, struct pvrdma_srq *srq)
> 
> 	pvrdma_page_dir_cleanup(dev, &srq->pdir);
> 
>-	kfree(srq);
>-
> 	atomic_dec(&dev->num_srqs);
> }

Thanks for the fix, looks good to me.
Reviewed-by: Vishnu Dasa <vdasa@vmware.com>

--
vishnu
Jason Gunthorpe Oct. 1, 2019, 2:17 p.m. UTC | #2
On Wed, Sep 18, 2019 at 11:08:00PM +0000, Adit Ranadive wrote:
> An extra kfree cleanup was missed since these are now deallocated
> by core.
> 
> Cc: <stable@vger.kernel.org>
> Fixes: 68e326dea1db ("RDMA: Handle SRQ allocations by IB/core")
> Signed-off-by: Adit Ranadive <aditr@vmware.com>
> Reviewed-by: Vishnu Dasa <vdasa@vmware.com>
> ---
>  drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c | 2 --
>  1 file changed, 2 deletions(-)

Applied to for-rc, thanks

Jason

Patch
diff mbox series

diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c
index 6cac0c88cf39..36cdfbdbd325 100644
--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c
+++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c
@@ -230,8 +230,6 @@  static void pvrdma_free_srq(struct pvrdma_dev *dev, struct pvrdma_srq *srq)
 
 	pvrdma_page_dir_cleanup(dev, &srq->pdir);
 
-	kfree(srq);
-
 	atomic_dec(&dev->num_srqs);
 }