RDMA/bnxt_re: Remove unpaired rtnl unlock in bnxt_re_dev_init()
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Mon, 16 Aug 2021 08:55:31 +0000 (16:55 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Sep 2021 08:09:23 +0000 (10:09 +0200)
commit3a2c5fbb1cc60b9ef6e3c142c40952fe711470bf
treef725abcf791242176d15d9f078d56b9b0453fd36
parent56ac7463a1403996f263b08812f64179e54e3f0b
RDMA/bnxt_re: Remove unpaired rtnl unlock in bnxt_re_dev_init()

[ Upstream commit a036ad088306a88de87e973981f2b9224e466c3f ]

The fixed commit removes all rtnl_lock() and rtnl_unlock() calls in
function bnxt_re_dev_init(), but forgets to remove a rtnl_unlock() in the
error handling path of bnxt_re_register_netdev(), which may cause a
deadlock. This bug is suggested by a static analysis tool.

Fixes: c2b777a95923 ("RDMA/bnxt_re: Refactor device add/remove functionalities")
Link: https://lore.kernel.org/r/20210816085531.12167-1-dinghao.liu@zju.edu.cn
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Acked-by: Selvin Xavier <selvin.xavier@broadcom.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/bnxt_re/main.c