Re: [PATCH V6] virtio-net: fix the race between refill work and close

2022-07-25 Thread Xuan Zhuo
On Mon, 25 Jul 2022 15:21:59 +0800, Jason Wang wrote: > We try using cancel_delayed_work_sync() to prevent the work from > enabling NAPI. This is insufficient since we don't disable the source > of the refill work scheduling. This means an NAPI poll callback after > cancel_delayed_work_sync() can

Re: [PATCH V6] virtio-net: fix the race between refill work and close

2022-07-25 Thread Michael S. Tsirkin
On Mon, Jul 25, 2022 at 03:21:59PM +0800, Jason Wang wrote: > We try using cancel_delayed_work_sync() to prevent the work from > enabling NAPI. This is insufficient since we don't disable the source > of the refill work scheduling. This means an NAPI poll callback after > cancel_delayed_work_sync()

Re: [PATCH V6] virtio-net: fix the race between refill work and close

2022-07-25 Thread Jason Wang
On Mon, Jul 25, 2022 at 3:22 PM Jason Wang wrote: > > We try using cancel_delayed_work_sync() to prevent the work from > enabling NAPI. This is insufficient since we don't disable the source > of the refill work scheduling. This means an NAPI poll callback after > cancel_delayed_work_sync() can sc

[PATCH V6] virtio-net: fix the race between refill work and close

2022-07-25 Thread Jason Wang
We try using cancel_delayed_work_sync() to prevent the work from enabling NAPI. This is insufficient since we don't disable the source of the refill work scheduling. This means an NAPI poll callback after cancel_delayed_work_sync() can schedule the refill work then can re-enable the NAPI that leads