From: Jakub Kicinski <kuba@kernel.org>
To: Taehee Yoo <ap420073@gmail.com>
Cc: davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
andrew+netdev@lunn.ch, horms@kernel.org,
michael.chan@broadcom.com, pavan.chebbi@broadcom.com,
netdev@vger.kernel.org, romieu@fr.zoreil.com, kuniyu@amazon.com
Subject: Re: [PATCH net] eth: bnxt: fix deadlock in the mgmt_ops
Date: Wed, 2 Apr 2025 09:51:57 -0700 [thread overview]
Message-ID: <20250402095157.4d7c53ee@kernel.org> (raw)
In-Reply-To: <20250402133123.840173-1-ap420073@gmail.com>
On Wed, 2 Apr 2025 13:31:23 +0000 Taehee Yoo wrote:
> When queue is being reset, callbacks of mgmt_ops are called by
> netdev_nl_bind_rx_doit().
> The netdev_nl_bind_rx_doit() first acquires netdev_lock() and then calls
> callbacks.
> So, mgmt_ops callbacks should not acquire netdev_lock() internaly.
>
> The bnxt_queue_{start | stop}() calls napi_{enable | disable}() but they
> internally acquire netdev_lock().
> So, deadlock occurs.
>
> To avoid deadlock, napi_{enable | disable}_locked() should be used
> instead.
>
> Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()")
Too far back, v6.14 doesn't need this fix. I think the Fixes tags
should be:
Fixes: cae03e5bdd9e ("net: hold netdev instance lock during queue operations")
No need to repost, I'll change when applying. Unless I'm wrong.
next prev parent reply other threads:[~2025-04-02 16:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-02 13:31 [PATCH net] eth: bnxt: fix deadlock in the mgmt_ops Taehee Yoo
2025-04-02 14:07 ` Stanislav Fomichev
2025-04-02 16:30 ` Michael Chan
2025-04-02 16:51 ` Jakub Kicinski [this message]
2025-04-03 22:20 ` 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=20250402095157.4d7c53ee@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=ap420073@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuniyu@amazon.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=romieu@fr.zoreil.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;
as well as URLs for NNTP newsgroup(s).