Skip to content

Commit 43d0121

Browse files
Dan Carpenterdavem330
authored andcommitted
rocker: fix a sleeping in atomic bug
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4407318 commit 43d0121

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/rocker/rocker_ofdpa.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2783,7 +2783,8 @@ static void ofdpa_fib4_abort(struct rocker *rocker)
27832783
if (!ofdpa_port)
27842784
continue;
27852785
nh->fib_nh_flags &= ~RTNH_F_OFFLOAD;
2786-
ofdpa_flow_tbl_del(ofdpa_port, OFDPA_OP_FLAG_REMOVE,
2786+
ofdpa_flow_tbl_del(ofdpa_port,
2787+
OFDPA_OP_FLAG_REMOVE | OFDPA_OP_FLAG_NOWAIT,
27872788
flow_entry);
27882789
}
27892790
spin_unlock_irqrestore(&ofdpa->flow_tbl_lock, flags);

0 commit comments

Comments
 (0)