Re: [PATCH] io_uring: fix sporadic double CQE entry for close

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

 



On 1/31/20 5:40 PM, Pavel Begunkov wrote:
> On 01/02/2020 03:21, Jens Axboe wrote:
>> We punt close to async for the final fput(), but we log the completion
>> even before that even in that case. We rely on the request not having
>> a files table assigned to detect what the final async close should do.
>> However, if we punt the async queue to __io_queue_sqe(), we'll get
>> ->files assigned and this makes io_close_finish() think it should both
>> close the filp again (which does no harm) AND log a new CQE event for
>> this request. This causes duplicate CQEs.
>>
>> Queue the request up for async manually so we don't grab files
>> needlessly and trigger this condition.
>>
> 
> Evidently from your 2 last patches, it's becoming hard to track everything in
> the current state. As mentioned, I'm going to rework and fix submission and prep
> paths with a bit of formalisation.

Honestly don't think it's that bad, not unusual to have a bit of
fallout from the large amount of changes that just went in. That said,
I'm obviously always interested in anything that is clear and hardens
the flow.

-- 
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