From: Jens Axboe <[email protected]>
To: Tudor Cretu <[email protected]>, [email protected]
Cc: [email protected], [email protected], [email protected],
[email protected]
Subject: Re: [PATCH] io_uring/kbuf: Fix size for shared buffer ring
Date: Thu, 27 Apr 2023 08:35:06 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 4/27/23 8:31?AM, Tudor Cretu wrote:
> The size of the ring is the product of ring_entries and the size of
> struct io_uring_buf. Using struct_size is equivalent to
> (ring_entries + 1) * sizeof(struct io_uring_buf)
> and generates an off-by-one error. Fix it by using size_mul directly.
Looks right, so we're doing one entry too much. This is probably a
remnant of when the initial version had it done a bit differently, but
we overlaid the tail with the first entry reserved field.
--
Jens Axboe
next prev parent reply other threads:[~2023-04-27 14:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 14:31 [PATCH] io_uring/kbuf: Fix size for shared buffer ring Tudor Cretu
2023-04-27 14:35 ` Jens Axboe [this message]
2023-04-27 18:42 ` Jens Axboe
2023-04-28 10:29 ` Tudor Cretu
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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