public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Qingfang Deng <dqfext@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Felix Fietkau <nbd@nbd.name>,
	linux-ppp@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] ppp: fix race conditions in ppp_fill_forward_path
Date: Tue, 12 Aug 2025 15:02:35 +0200	[thread overview]
Message-ID: <aJs7az9VnJ6aUwQT@calendula> (raw)
In-Reply-To: <CALW65jYNMNArwzmpHhYj3fpfL0Oz2fRYsJz0JMDUnyByu-8z3w@mail.gmail.com>

On Tue, Aug 12, 2025 at 05:38:02PM +0800, Qingfang Deng wrote:
> On Mon, Aug 11, 2025 at 5:35 PM Qingfang Deng <dqfext@gmail.com> wrote:
> >
> > On Mon, Aug 11, 2025 at 5:19 PM Eric Dumazet <edumazet@google.com> wrote:
> > >
> > > On Mon, Aug 11, 2025 at 1:44 AM Qingfang Deng <dqfext@gmail.com> wrote:
> > > It is unclear if rcu_read_lock() is held at this point.
> > >
> > > list_first_or_null_rcu() does not have a builtin __list_check_rcu()
> >
> > ndo_fill_forward_path() is called by nf_tables chains, which is inside
> > an RCU critical section.
> 
> Update: mtk_flow_get_wdma_info() in mtk_ppe_offload.c calls
> dev_fill_forward_path() in process context without RCU, so
> ppp_fill_forward_path() can be called from two different contexts.
> Should I add rcu_read_lock() to mtk_flow_get_wdma_info() or
> ppp_fill_forward_path()?

mtk_flow_get_wdma_info() seems to be the exception at this point, so
I'm inclined to add rcu_read_lock() to mtk_flow_get_wdma_info().

  reply	other threads:[~2025-08-12 13:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11  8:44 [PATCH net] ppp: fix race conditions in ppp_fill_forward_path Qingfang Deng
2025-08-11  9:19 ` Eric Dumazet
2025-08-11  9:35   ` Qingfang Deng
2025-08-12  9:38     ` Qingfang Deng
2025-08-12 13:02       ` Pablo Neira Ayuso [this message]
2025-08-13  1:46         ` Qingfang Deng

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=aJs7az9VnJ6aUwQT@calendula \
    --to=pablo@netfilter.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ppp@vger.kernel.org \
    --cc=nbd@nbd.name \
    --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