From: Stefano Brivio <sbrivio@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: passt-dev@passt.top, david@gibson.dropbear.id.au
Subject: Re: [PATCH v2] util: fix confusion between offset in the iovec array and in the entry
Date: Wed, 20 Mar 2024 12:03:51 +0100 [thread overview]
Message-ID: <20240320120351.4b9fb9b7@elisabeth> (raw)
In-Reply-To: <20240320084726.1851595-1-lvivier@redhat.com>
On Wed, 20 Mar 2024 09:47:26 +0100
Laurent Vivier <lvivier@redhat.com> wrote:
> In write_remainder() 'skip' is the offset to start the operation from
> in the iovec array.
>
> In iov_skip_bytes(), 'skip' is also the offset in the iovec array but
> 'offset' is the first unskipped byte in the iovec entry.
>
> As write_remainder() uses 'skip' for both, 'skip' is reset to the
> first unskipped byte in the iovec entry rather to staying the first
> unskipped byte in the iovec array.
>
> Fix the problem by introducing a new variable not to overwrite 'skip'
> on each loop.
>
> Fixes: 8bdb0883b441 ("util: Add write_remainder() helper")
> Cc: david@gibson.dropbear.id.au
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Applied.
--
Stefano
prev parent reply other threads:[~2024-03-20 11:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 8:47 [PATCH v2] util: fix confusion between offset in the iovec array and in the entry Laurent Vivier
2024-03-20 8:53 ` David Gibson
2024-03-20 11:03 ` Stefano Brivio [this message]
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=20240320120351.4b9fb9b7@elisabeth \
--to=sbrivio@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=lvivier@redhat.com \
--cc=passt-dev@passt.top \
/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.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).