Re: [PATCH 1/3] io_uring: simplify io_mem_alloc return values

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

 



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




[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