Re: [PATCH 1/1] io_uring: fix racy REQ_F_LINK_TIMEOUT clearing

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

 



On 10/19/20 9:39 AM, Pavel Begunkov wrote:
> io_link_timeout_fn() removes REQ_F_LINK_TIMEOUT from the link head's
> flags, it's not atomic and may race with what the head is doing.
> 
> If io_link_timeout_fn() doesn't clear the flag, as forced by this patch,
> then it may happen that for "req -> link_timeout1 -> link_timeout2",
> __io_kill_linked_timeout() would find link_timeout2 and try to cancel
> it, so miscounting references. Teach it to ignore such double timeouts
> by marking the active one with a new flag in io_prep_linked_timeout().

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