diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2018-12-22 11:30:30 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-12-23 00:07:47 +0100 |
commit | f617e5ffe04fd46010b618c9eeadaa04588704c9 (patch) | |
tree | 0ef9855cfedb778a009701e3fa234c00a451a737 /drivers/infiniband | |
parent | RDMA/mlx5: Signedness bug in UVERBS_HANDLER() (diff) | |
download | linux-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.c | 2 |
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: |