All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] ionic: fix a sleeping in atomic bug
@ 2021-09-03 13:18 Dan Carpenter
  2021-09-03 15:14 ` Shannon Nelson
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2021-09-03 13:18 UTC (permalink / raw)
  To: Shannon Nelson
  Cc: drivers, David S. Miller, Jakub Kicinski, Allen Hubbe, netdev,
	kernel-janitors

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>
---
 drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c b/drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c
index 7e3a5634c161..25ecfcfa1281 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c
@@ -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;
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] ionic: fix a sleeping in atomic bug
  2021-09-03 13:18 [PATCH net-next] ionic: fix a sleeping in atomic bug Dan Carpenter
@ 2021-09-03 15:14 ` Shannon Nelson
  2021-09-03 23:17   ` Jakub Kicinski
  0 siblings, 1 reply; 3+ messages in thread
From: Shannon Nelson @ 2021-09-03 15:14 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: drivers, David S. Miller, Jakub Kicinski, Allen Hubbe, netdev,
	kernel-janitors

On 9/3/21 6:18 AM, Dan Carpenter wrote:
> 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>

> ---
>   drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c b/drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c
> index 7e3a5634c161..25ecfcfa1281 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c
> @@ -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;
>   


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] ionic: fix a sleeping in atomic bug
  2021-09-03 15:14 ` Shannon Nelson
@ 2021-09-03 23:17   ` Jakub Kicinski
  0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2021-09-03 23:17 UTC (permalink / raw)
  To: Shannon Nelson, Dan Carpenter
  Cc: drivers, David S. Miller, Allen Hubbe, netdev, kernel-janitors

On Fri, 3 Sep 2021 08:14:25 -0700 Shannon Nelson wrote:
> On 9/3/21 6:18 AM, Dan Carpenter wrote:
> > 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>

Applied, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-03 23:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-03 13:18 [PATCH net-next] ionic: fix a sleeping in atomic bug Dan Carpenter
2021-09-03 15:14 ` Shannon Nelson
2021-09-03 23:17   ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.