]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
RDMA/hfi1: Prevent memory leak in sdma_init
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Wed, 25 Sep 2019 14:45:42 +0000 (09:45 -0500)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 13 Nov 2019 23:47:34 +0000 (18:47 -0500)
commitf82eba2099ead25ab13dde3d05271710b225ed56
tree8f7e7c7bd1eed34a783fc9f14a668e468374b621
parentfe12247a1cc513da478f36868b98cd9aa4e7cec8
RDMA/hfi1: Prevent memory leak in sdma_init

BugLink: https://bugs.launchpad.net/bugs/1852492
[ Upstream commit 34b3be18a04ecdc610aae4c48e5d1b799d8689f6 ]

In sdma_init if rhashtable_init fails the allocated memory for
tmp_sdma_rht should be released.

Fixes: 5a52a7acf7e2 ("IB/hfi1: NULL pointer dereference when freeing rhashtable")
Link: https://lore.kernel.org/r/20190925144543.10141-1-navid.emamdoost@gmail.com
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/infiniband/hw/hfi1/sdma.c