netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qingfang Deng <dqfext@gmail.com>
To: Eric Dumazet <edumazet@google.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	 Pablo Neira Ayuso <pablo@netfilter.org>,
	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 17:38:02 +0800	[thread overview]
Message-ID: <CALW65jYNMNArwzmpHhYj3fpfL0Oz2fRYsJz0JMDUnyByu-8z3w@mail.gmail.com> (raw)
In-Reply-To: <CALW65jZ-uBWOkxPVMQc3Yg-KEoVRdPQYVC3+q5MiQbvpDZBKTQ@mail.gmail.com>

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()?

  reply	other threads:[~2025-08-12  9:38 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 [this message]
2025-08-12 13:02       ` Pablo Neira Ayuso
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=CALW65jYNMNArwzmpHhYj3fpfL0Oz2fRYsJz0JMDUnyByu-8z3w@mail.gmail.com \
    --to=dqfext@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --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 \
    --cc=pablo@netfilter.org \
    /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;
as well as URLs for NNTP newsgroup(s).