From: Eric Dumazet <eric.dumazet@gmail.com>
To: Lijun Pan <lijunp213@gmail.com>, netdev@vger.kernel.org
Subject: Re: [PATCH net v2] net: core: make napi_disable more robust
Date: Thu, 15 Apr 2021 08:47:52 +0200 [thread overview]
Message-ID: <1917fb7e-e8e5-a65a-7232-ddd6407fcc53@gmail.com> (raw)
In-Reply-To: <20210414080845.11426-1-lijunp213@gmail.com>
On 4/14/21 10:08 AM, Lijun Pan wrote:
> There are chances that napi_disable can be called twice by NIC driver.
> This could generate deadlock. For example,
> the first napi_disable will spin until NAPI_STATE_SCHED is cleared
> by napi_complete_done, then set it again.
> When napi_disable is called the second time, it will loop infinitely
> because no dev->poll will be running to clear NAPI_STATE_SCHED.
>
> Though it is driver writer's responsibility to make sure it being
> called only once, making napi_disable more robust does not hurt, not
> to say it can prevent a buggy driver from crashing a system.
This is hard to digest. A buggy driver has plenty of ways to crash the system.
If you need help to fix the buggy driver, please ask for help.
prev parent reply other threads:[~2021-04-15 6:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-14 8:08 [PATCH net v2] net: core: make napi_disable more robust Lijun Pan
2021-04-14 8:45 ` Yunsheng Lin
2021-04-14 17:31 ` Lijun Pan
2021-04-14 23:21 ` Jakub Kicinski
2021-04-15 6:46 ` Eric Dumazet
2021-04-15 6:47 ` Eric Dumazet [this message]
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=1917fb7e-e8e5-a65a-7232-ddd6407fcc53@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=lijunp213@gmail.com \
--cc=netdev@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 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).