Re: Erroneous socket connect pass?

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

 



On 5/27/22 8:29 AM, Weber, Eugene F Jr CIV (USA) wrote:
> 
> Hi,
> 
> Thanks for creating liburing. Great stuff.
> 
> I **may** have found a bug. I would expect a socket connect using
> io_uring to fail as it does using connect() if the port is not setup
> to listen. In the simple test case attached it does not. If this is
> pilot error, please let me know what I'm doing wrong, or why my
> expectation is incorrect. Version information is in the code header.
> Please let me know if any additional information is needed.

The return value of io_uring_wait_cqe and related functions isn't the
completion result. It's simply if we succeeded in waiting for one or
more events. It could never be the completion result, because consider
what happens if you have multiple requests in flight.

You need to look at cqe->res for the completion result of the request.

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