ionic: fix a sleeping in atomic bug
Subsystems (4)
PATCH 1/1 ionic: fix a sleeping in atomic bug
This code is holding spin_lock_bh(&lif->rx_filters.lock); so the allocation needs to be atomic.
Fixes 969f84394604 ("ionic: sync the filters in the work task")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c +1 -1
@@ -318,7 +318,7 @@ void ionic_rx_filter_sync(struct ionic_lif *lif)if (f->state ==IONIC_FILTER_STATE_NEW || f->state ==IONIC_FILTER_STATE_OLD ) { sync_item =devm_kzalloc (dev,sizeof (*sync_item), -GFP_KERNEL ); +GFP_ATOMIC );if (!sync_item) goto loop_out;
Signature · 1 line
2.20.1
Quoted 5 lines · Dan Carpenter
This code is holding
spin_lock_bh(&lif->rx_filters.lock); so the allocation needs to be atomic.Fixes 969f84394604 ("ionic: sync the filters in the work task")Signed-off-by Dan Carpenter <[email protected]>
Signed-off-by Shannon Nelson <[email protected]>
Quoted 17 lines
--- drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c +1
-1@@ -318,7 +318,7 @@ void ionic_rx_filter_sync(struct ionic_lif *lif)if (f->state ==IONIC_FILTER_STATE_NEW || f->state ==IONIC_FILTER_STATE_OLD ) { sync_item =devm_kzalloc (dev,sizeof (*sync_item), -GFP_KERNEL ); +GFP_ATOMIC );if (!sync_item) goto loop_out;
Quoted 8 lines · On Fri, 3 Sep 2021 08:14:25 -0700 Shannon Nelson wrote:
Quoted 5 lines · Dan Carpenter
This code is holding
spin_lock_bh(&lif->rx_filters.lock); so the allocation needs to be atomic.Fixes 969f84394604 ("ionic: sync the filters in the work task")Signed-off-by Dan Carpenter <[email protected]>Signed-off-by Shannon Nelson <[email protected]>
Applied, thanks!