From: Michael Chan <michael.chan@broadcom.com>
To: Taehee Yoo <ap420073@gmail.com>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, andrew+netdev@lunn.ch, horms@kernel.org,
ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org,
john.fastabend@gmail.com, pavan.chebbi@broadcom.com,
sdf@fomichev.me, netdev@vger.kernel.org, bpf@vger.kernel.org,
jdamato@fastly.com, martin.lau@kernel.org,
hramamurthy@google.com
Subject: Re: [PATCH net-next] eth: bnxt: fix deadlock when xdp is attached or detached
Date: Tue, 20 May 2025 11:15:03 -0700 [thread overview]
Message-ID: <CACKFLinam==HdSB1KHRitGByAXNGW9awmfyu_jRasjA-qKmCHQ@mail.gmail.com> (raw)
In-Reply-To: <20250520071155.2462843-1-ap420073@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 754 bytes --]
On Tue, May 20, 2025 at 12:12 AM Taehee Yoo <ap420073@gmail.com> wrote:
>
> When xdp is attached or detached, dev->ndo_bpf() is called by
> do_setlink(), and it acquires netdev_lock() if needed.
> Unlike other drivers, the bnxt driver is protected by netdev_lock while
> xdp is attached/detached because it sets dev->request_ops_lock to true.
>
> So, the bnxt_xdp(), that is callback of ->ndo_bpf should not acquire
> netdev_lock().
> But the xdp_features_{set | clear}_redirect_target() was changed to
> acquire netdev_lock() internally.
> It causes a deadlock.
> To fix this problem, bnxt driver should use
> xdp_features_{set | clear}_redirect_target_locked() instead.
Thanks.
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4196 bytes --]
next prev parent reply other threads:[~2025-05-20 18:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 7:11 [PATCH net-next] eth: bnxt: fix deadlock when xdp is attached or detached Taehee Yoo
2025-05-20 15:18 ` Simon Horman
2025-05-20 18:15 ` Michael Chan [this message]
2025-05-22 15:50 ` patchwork-bot+netdevbpf
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='CACKFLinam==HdSB1KHRitGByAXNGW9awmfyu_jRasjA-qKmCHQ@mail.gmail.com' \
--to=michael.chan@broadcom.com \
--cc=andrew+netdev@lunn.ch \
--cc=ap420073@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=hramamurthy@google.com \
--cc=jdamato@fastly.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=martin.lau@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=sdf@fomichev.me \
/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).