cxgb4: dont touch blocked freelist bitmap after free
authorRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Wed, 25 Aug 2021 21:29:42 +0000 (02:59 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Sep 2021 08:09:25 +0000 (10:09 +0200)
commit51bc5c66606d5e155638a95266b674992e088e6e
tree0974f99e1ee19f399a48a2eb7872df9135b09571
parentbeefd5f0c63a31a83bc5a99e6888af884745684b
cxgb4: dont touch blocked freelist bitmap after free

[ Upstream commit 43fed4d48d325e0a61dc2638a84da972fbb1087b ]

When adapter init fails, the blocked freelist bitmap is already freed
up and should not be touched. So, move the bitmap zeroing closer to
where it was successfully allocated. Also handle adapter init failure
unwind path immediately and avoid setting up RDMA memory windows.

Fixes: 5b377d114f2b ("cxgb4: Add debugfs facility to inject FL starvation")
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c