[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aJs7az9VnJ6aUwQT@calendula>
Date: Tue, 12 Aug 2025 15:02:35 +0200
From: Pablo Neira Ayuso <pablo@...filter.org>
To: Qingfang Deng <dqfext@...il.com>
Cc: Eric Dumazet <edumazet@...gle.com>, Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Felix Fietkau <nbd@....name>, linux-ppp@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] ppp: fix race conditions in ppp_fill_forward_path
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@...il.com> wrote:
> >
> > On Mon, Aug 11, 2025 at 5:19 PM Eric Dumazet <edumazet@...gle.com> wrote:
> > >
> > > On Mon, Aug 11, 2025 at 1:44 AM Qingfang Deng <dqfext@...il.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().
Powered by blists - more mailing lists