# Re: \[PATCH RESEND\] nbd: Aovid double completion of a request

- From: Jens Axboe \<axboe@kernel.dk\>
- Date: 2021-08-13 15:47:32 
- List: linux-block
- Page: https://ratatoskr.run/linux-block/2021/08/6404662
- Thread: https://ratatoskr.run/linux-block/2021/08/6404660/t.md

```text
On 8/13/21 9:13 AM, Xie Yongji wrote:
> There is a race between iterating over requests in
> nbd_clear_que() and completing requests in recv_work(),
> which can lead to double completion of a request.
> 
> To fix it, flush the recv worker before iterating over
> the requests and don't abort the completed request
> while iterating.

Applied, thanks.

-- 
Jens Axboe

```
