public inbox for linux-mediatek@lists.infradead.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, netdev@vger.kernel.org
Subject: Re: [PATCH net] net: airoha: Fix schedule while atomic in airoha_ppe_deinit()
Date: Mon, 5 Jan 2026 09:33:03 +0100	[thread overview]
Message-ID: <aVt3P_sAeb0UtshZ@lore-rh-laptop> (raw)
In-Reply-To: <20260104095748.70107b9b@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 770 bytes --]

> On Tue, 23 Dec 2025 22:56:44 +0100 Lorenzo Bianconi wrote:
> > Rely on rcu_replace_pointer in airoha_ppe_deinit routine in order to fix
> > schedule while atomic issue.
> 
> The information in the commit message is not sufficient.
> What "schedule while atomic issue"?

The issue is we run kzalloc() with GFP_KERNEL in airoha_npu_ppe_deinit()
in atomic context but we do not really need atomic context there.
I will fix the commit log in v2.

Regards,
Lorenzo

> 
> > -	npu = rcu_dereference(eth->npu);
> > +	mutex_lock(&flow_offload_mutex);
> > +
> > +	npu = rcu_replace_pointer(eth->npu, NULL,
> > +				  lockdep_is_held(&flow_offload_mutex));
> >  	if (npu) {
> >  		npu->ops.ppe_deinit(npu);
> >  		airoha_npu_put(npu);
> -- 
> pw-bot: cr

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2026-01-05  8:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-23 21:56 [PATCH net] net: airoha: Fix schedule while atomic in airoha_ppe_deinit() Lorenzo Bianconi
2026-01-04 17:57 ` Jakub Kicinski
2026-01-05  8:33   ` Lorenzo Bianconi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aVt3P_sAeb0UtshZ@lore-rh-laptop \
    --to=lorenzo@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox