]> www.infradead.org Git - users/dwmw2/linux.git/commit
RDMA/cma: fix null-ptr-deref Read in cma_cleanup
authorzhengbin <zhengbin13@huawei.com>
Mon, 19 Aug 2019 04:27:39 +0000 (12:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2019 09:35:21 +0000 (10:35 +0100)
commitfc38afc0434394e48d6170fd303e1dc99bb08989
treeb233adc22de8a40bede492c06f17f2615123c7c1
parentd61a256fece284909132d7e8eb6b7d385b864eac
RDMA/cma: fix null-ptr-deref Read in cma_cleanup

[ Upstream commit a7bfb93f0211b4a2f1ffeeb259ed6206bac30460 ]

In cma_init, if cma_configfs_init fails, need to free the
previously memory and return fail, otherwise will trigger
null-ptr-deref Read in cma_cleanup.

cma_cleanup
  cma_configfs_exit
    configfs_unregister_subsystem

Fixes: 045959db65c6 ("IB/cma: Add configfs for rdma_cm")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Link: https://lore.kernel.org/r/1566188859-103051-1-git-send-email-zhengbin13@huawei.com
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/core/cma.c