Bug 207461 - io_uring IORING_OP_POLL_ADD fails when fd is a tty
Summary: io_uring IORING_OP_POLL_ADD fails when fd is a tty
Status: NEW
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: AIO (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Badari Pulavarty
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-27 12:16 UTC by Clay Harris
Modified: 2024-09-05 15:04 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.6.6-200.fc31.x86_64
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Test program to compare poll() to io_uring ADD_POLL (4.82 KB, text/x-csrc)
2020-04-27 12:16 UTC, Clay Harris
Details

Description Clay Harris 2020-04-27 12:16:55 UTC
Created attachment 288761 [details]
Test program to compare poll() to io_uring ADD_POLL

io_uring POLL_ADD should return identical results to poll/epoll.
(With the possible exception of epoll not accepting regular files.)

Test program performs 3 steps using fd = 0.

0. poll() for POLLIN
1. epoll() for POLLIN
2. io_uring poll for POLLIN

The expected result is that each step returns identical information.

The actual result is:

A) As expected, if fd 0 is a pipe.

B) But if fd 0 is a tty:

a
do_poll: events 00000001
  read 2 bytes: a
b
do_epoll: events 00000001
  read 2 bytes: b
do_io_uring_poll() failed, errno 22: Invalid argument


Test program attached.
Comment 1 Jens Axboe 2024-09-05 15:04:04 UTC
This was double poll, long since fixed.

Note You need to log in before you can comment on or make changes to this bug.