Re: [PATCH] io_uring: fix submission-failure handling for uring-cmd

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

 



On 8/23/22 10:47, Kanchan Joshi wrote:
> On Tue, Aug 23, 2022 at 09:47:39AM -0600, Jens Axboe wrote:
>> On 8/23/22 9:10 AM, Kanchan Joshi wrote:
>>> If ->uring_cmd returned an error value different from -EAGAIN or
>>> -EIOCBQUEUED, it gets overridden with IOU_OK. This invites trouble
>>> as caller (io_uring core code) handles IOU_OK differently than other
>>> error codes.
>>> Fix this by returning the actual error code.
>>
>> Not sure if this is strictly needed, as the cqe error is set just
>> fine. But I guess some places also check return value of the issue
>> path.
> 
> So I was testing iopoll support and ran into this issue - submission
> failed (expected one), control came back to this point, error code
> got converted to IOU_OK, and it started polling endlessly for a command
> that never got submitted.
> io_issue_sqe continued to invoke io_iopoll_req_issued() rather than
> bailing out.

Ah ok, yes for iopoll it'd make a difference...

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