Re: [PATCH 1/1] IB/rxe: replace kvfree with vfree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2018/9/26 1:42, Leon Romanovsky wrote:
On Tue, Sep 25, 2018 at 08:15:27AM -0400, Zhu Yanjun wrote:
The buf is allocated by vmalloc_user in the function rxe_queue_init.
So it is better to free it by vfree.

Signed-off-by: Zhu Yanjun <yanjun.zhu@xxxxxxxxxx>
---
  drivers/infiniband/sw/rxe/rxe_qp.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index c58452d..75f6469 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -247,7 +247,7 @@ static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp,
  			   &qp->sq.queue->ip);

  	if (err) {
-		kvfree(qp->sq.queue->buf);
+		vfree(qp->sq.queue->buf);
You need the same change in rxe_qp_init_resp()
OK. I will send V2 patch to include this.

Zhu Yanjun

  		kfree(qp->sq.queue);
  		return err;
  	}
--
2.7.4





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux