Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <dan.carpenter@oracle.com>
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Link: https://lore.kernel.org/r/20210903131856.GA25934@kili
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Dan Carpenter and committed by
Jakub Kicinski
52a67fbf 9756e44f

+1 -1
+1 -1
drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c
··· 318 318 if (f->state == IONIC_FILTER_STATE_NEW || 319 319 f->state == IONIC_FILTER_STATE_OLD) { 320 320 sync_item = devm_kzalloc(dev, sizeof(*sync_item), 321 - GFP_KERNEL); 321 + GFP_ATOMIC); 322 322 if (!sync_item) 323 323 goto loop_out; 324 324