Re: [PATCH 5.10] io_uring: fix files grab/cancel race

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/25/20 11:41 AM, Pavel Begunkov wrote:
> When one task is in io_uring_cancel_files() and another is doing
> io_prep_async_work() a race may happen. That's because after accounting
> a request inflight in first call to io_grab_identity() it still may fail
> and go to io_identity_cow(), which migh briefly keep dangling
> work.identity and not only.
> 
> Grab files last, so io_prep_async_work() won't fail if it did get into
> ->inflight_list.
> 
> note: the bug shouldn't exist after making io_uring_cancel_files() not
> poking into other tasks' requests.

Applied, thanks.

-- 
Jens Axboe




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux