On 3/13/24 20:50, Jens Axboe wrote:
On 3/13/24 9:52 AM, Pavel Begunkov wrote:
io_mem_alloc() returns a pointer on success and a pointer-encoded error
otherwise. However, it can only fail with -ENOMEM, just return NULL on
failure. PTR_ERR is usually pretty error prone.
I take that back, this is buggy - the io_rings_map() and friends return
an error pointer. So better to keep it consistent. Dropped this one.
Oh crap, you're right. Did something trigger it? Because tests
are suspiciously silent, I'd assume it's not really tested,
e.g. passing misaligned uptr
--
Pavel Begunkov