summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2018-12-22 11:30:30 +0100
committerJason Gunthorpe <jgg@mellanox.com>2018-12-23 00:07:47 +0100
commitf617e5ffe04fd46010b618c9eeadaa04588704c9 (patch)
tree0ef9855cfedb778a009701e3fa234c00a451a737 /drivers/infiniband
parentRDMA/mlx5: Signedness bug in UVERBS_HANDLER() (diff)
downloadlinux-f617e5ffe04fd46010b618c9eeadaa04588704c9.tar.xz
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')
-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: