Re: [PATCH] io_uring/rw: fix missing ERESTARTSYS conversion in read paths
Yitang Yang <[email protected]> Wed, 22 Jul 2026 11:08:55 +0800
| Newsgroups | org.kernel.vger.io-uring |
|---|---|
| Message-ID | <CADd-6FwNfTcar6JRrdq4P9Pj_5y-HzqsCgythMLjhhBQyO5FCg@mail.gmail.com> |
I found this while trying to combine io_uring read multishot with userfaultfd. I wrote a reproducer here: https://gist.github.com/wokron/7f75026e02792844b0bbf26b7e79c9ef Running it with "sudo ./userfaultfd-uring -n 16 -p 10000" on my machine consistently produces "io_uring_cqe error: Unknown error 512". Jens Axboe <[email protected]> 于2026年7月22日周三 00:32写道: > > On 7/20/26 5:41 AM, Yitang Yang wrote: > > Both read and write may receive internal restart error codes from > > the filesystem layer and should be converted to -EINTR. However, > > when multishot read support was added, the error code normalization > > was lost for both io_read() and io_read_mshot(). > > > > Extract the conversion into io_fixup_restart_res() and apply it > > in all three locations: io_rw_done(), io_read(), and io_read_mshot(). > > How was this found? Reason I ask is that I wonder if this is even > necessary in the first place. If you found this because of an issue > you ran into, then that answers that question clearly (yes we need it). > But if this some LLM find, then that's an entirely different story. > > -- > Jens Axboe >