public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Pavel Begunkov <asml.silence@gmail.com>, io-uring@vger.kernel.org
Subject: Re: [PATCH 1/3] io_uring: simplify io_mem_alloc return values
Date: Wed, 13 Mar 2024 15:02:12 -0600	[thread overview]
Message-ID: <d494127c-1b98-409d-8ba8-ea262bed62eb@kernel.dk> (raw)
In-Reply-To: <c089d416-f5f4-46d4-8e6f-9ea773d44c20@gmail.com>

On 3/13/24 2:43 PM, Pavel Begunkov wrote:
> 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

I was doing a cleanup on top, and noticed it while doing that. None of
the tests triggered it.

-- 
Jens Axboe


  reply	other threads:[~2024-03-13 21:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13 15:52 [PATCH 0/3] small rings clean up Pavel Begunkov
2024-03-13 15:52 ` [PATCH 1/3] io_uring: simplify io_mem_alloc return values Pavel Begunkov
2024-03-13 20:50   ` Jens Axboe
2024-03-13 20:43     ` Pavel Begunkov
2024-03-13 21:02       ` Jens Axboe [this message]
2024-03-13 22:32   ` Gabriel Krisman Bertazi
2024-03-13 23:24     ` Jens Axboe
2024-03-13 23:43       ` Gabriel Krisman Bertazi
2024-03-13 23:44         ` Jens Axboe
2024-03-13 15:52 ` [PATCH 2/3] io_uring: simplify io_pages_free Pavel Begunkov
2024-03-13 15:52 ` [PATCH 3/3] io_uring/kbuf: rename is_mapped Pavel Begunkov
2024-03-13 20:27 ` [PATCH 0/3] small rings clean up Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d494127c-1b98-409d-8ba8-ea262bed62eb@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox