Skip to content

Commit a1068bf

Browse files
Dan Carpentergregkh
authored andcommitted
rocker: fix a sleeping in atomic bug
[ Upstream commit 43d0121 ] This code is holding the &ofdpa->flow_tbl_lock spinlock so it is not allowed to sleep. That means we have to pass the OFDPA_OP_FLAG_NOWAIT flag to ofdpa_flow_tbl_del(). Fixes: 936bd48 ("rocker: use FIB notifications instead of switchdev calls") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 2db3447 commit a1068bf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/net/ethernet/rocker/rocker_ofdpa.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2795,7 +2795,8 @@ static void ofdpa_fib4_abort(struct rocker *rocker)
27952795
if (!ofdpa_port)
27962796
continue;
27972797
nh->fib_nh_flags &= ~RTNH_F_OFFLOAD;
2798-
ofdpa_flow_tbl_del(ofdpa_port, OFDPA_OP_FLAG_REMOVE,
2798+
ofdpa_flow_tbl_del(ofdpa_port,
2799+
OFDPA_OP_FLAG_REMOVE | OFDPA_OP_FLAG_NOWAIT,
27992800
flow_entry);
28002801
}
28012802
spin_unlock_irqrestore(&ofdpa->flow_tbl_lock, flags);

0 commit comments

Comments
 (0)