[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1917fb7e-e8e5-a65a-7232-ddd6407fcc53@gmail.com>
Date: Thu, 15 Apr 2021 08:47:52 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Lijun Pan <lijunp213@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net v2] net: core: make napi_disable more robust
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.
Powered by blists - more mailing lists