From: Leon Romanovsky <leon@kernel.org>
To: Louis Peens <louis.peens@corigine.com>
Cc: David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <simon.horman@corigine.com>,
netdev@vger.kernel.org, stable@vger.kernel.org,
oss-drivers@corigine.com
Subject: Re: [PATCH net] nfp: fix rcu_read_lock/unlock while rcu_derefrencing
Date: Tue, 9 May 2023 11:08:56 +0300 [thread overview]
Message-ID: <20230509080856.GG38143@unreal> (raw)
In-Reply-To: <20230509060632.8233-1-louis.peens@corigine.com>
On Tue, May 09, 2023 at 08:06:32AM +0200, Louis Peens wrote:
> From: Tianyu Yuan <tianyu.yuan@corigine.com>
>
> When CONFIG_PROVE_LOCKING and CONFIG_PROVE_RCU are enabled, using
> OVS with vf reprs on bridge will lead to following log in dmesg:
>
> '''
> .../nfp/flower/main.c:269 suspicious rcu_dereference_check() usage!
>
> other info that might help us debug this:
>
> rcu_scheduler_active = 2, debug_locks = 1
> no locks held by swapper/15/0.
>
> ......
> Call Trace:
> <IRQ>
> dump_stack_lvl+0x8c/0xa0
> lockdep_rcu_suspicious+0x118/0x1a0
> nfp_flower_dev_get+0xc1/0x240 [nfp]
> nfp_nfd3_rx+0x419/0xb90 [nfp]
> ? validate_chain+0x640/0x1880
> nfp_nfd3_poll+0x3e/0x180 [nfp]
> __napi_poll+0x28/0x1d0
> net_rx_action+0x2bd/0x3c0
> ? _raw_spin_unlock_irqrestore+0x42/0x70
> __do_softirq+0xc3/0x3c6
> irq_exit_rcu+0xeb/0x130
> common_interrupt+0xb9/0xd0
> </IRQ>
> <TASK>
> ......
> </TASK>
> '''
>
> This debug log is caused by missing of rcu_read_lock()/unlock().
> In previous patch rcu_read_lock/unlock are removed while they are
> still needed when calling rcu_dereference() in nfp_app_dev_get().
>
> Fixes: d5789621b658 ("nfp: Remove rcu_read_lock() around XDP program invocation")
> CC: stable@vger.kernel.org
> Signed-off-by: Tianyu Yuan <tianyu.yuan@corigine.com>
> Acked-by: Simon Horman <simon.horman@corigine.com>
> Signed-off-by: Louis Peens <louis.peens@corigine.com>
> ---
> drivers/net/ethernet/netronome/nfp/nfd3/dp.c | 4 ++--
> drivers/net/ethernet/netronome/nfp/nfd3/xsk.c | 2 +-
> drivers/net/ethernet/netronome/nfp/nfdk/dp.c | 4 ++--
> drivers/net/ethernet/netronome/nfp/nfp_app.h | 16 ++++++++++++++++
> 4 files changed, 21 insertions(+), 5 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
next prev parent reply other threads:[~2023-05-09 8:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-09 6:06 [PATCH net] nfp: fix rcu_read_lock/unlock while rcu_derefrencing Louis Peens
2023-05-09 8:08 ` Leon Romanovsky [this message]
2023-05-10 2:40 ` Jakub Kicinski
2023-05-10 6:10 ` Louis Peens
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=20230509080856.GG38143@unreal \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=louis.peens@corigine.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@corigine.com \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.com \
--cc=stable@vger.kernel.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 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.