RDMA/rxe: Fix memleak in rxe_mem_init_user
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Wed, 19 Aug 2020 07:56:32 +0000 (15:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 08:46:25 +0000 (10:46 +0200)
commit557f256d510e3714b1da60b4c0e42bc47459fca1
tree09d6ac4380f8b573cf742e47efd8f79bc71f535a
parentd406edabe7483cccfa82b15926c418b9b1f26936
RDMA/rxe: Fix memleak in rxe_mem_init_user

[ Upstream commit e3ddd6067ee62f6e76ebcf61ff08b2c729ae412b ]

When page_address() fails, umem should be freed just like when
rxe_mem_alloc() fails.

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Link: https://lore.kernel.org/r/20200819075632.22285-1-dinghao.liu@zju.edu.cn
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/sw/rxe/rxe_mr.c