summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2018-12-22 10:30:30 +0000
committerJason Gunthorpe <jgg@mellanox.com>2018-12-22 16:07:47 -0700
commitf617e5ffe04fd46010b618c9eeadaa04588704c9 (patch)
tree0ef9855cfedb778a009701e3fa234c00a451a737 /drivers/infiniband/ulp
parent58f7c0bfb4e111006ba376df7ab266a6d42d64ba (diff)
downloadblackbird-obmc-linux-f617e5ffe04fd46010b618c9eeadaa04588704c9.tar.gz
blackbird-obmc-linux-f617e5ffe04fd46010b618c9eeadaa04588704c9.zip
RDMA/srpt: Use kmem_cache_free() instead of kfree()
memory allocated by kmem_cache_alloc() should be freed using kmem_cache_free(), not kfree(). Fixes: 5dabcd0456d7 ("RDMA/srpt: Add support for immediate data") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/srpt/ib_srpt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index b2f63a6dadb6..e75c908e4bc2 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -674,7 +674,7 @@ static struct srpt_ioctx *srpt_alloc_ioctx(struct srpt_device *sdev,
return ioctx;
err_free_buf:
- kfree(ioctx->buf);
+ kmem_cache_free(buf_cache, ioctx->buf);
err_free_ioctx:
kfree(ioctx);
err:
OpenPOWER on IntegriCloud