qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/6] bsd-user/freebsd/os-syscall.c: unlock_iovec


From: Richard Henderson
Subject: Re: [PATCH 2/6] bsd-user/freebsd/os-syscall.c: unlock_iovec
Date: Tue, 7 Jun 2022 15:23:16 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

On 6/7/22 14:51, Warner Losh wrote:
    void unlock_iovec(IOVecMap *map, bool copy_out)
    {
          for (int i = 0, count = map->count; i < count; ++i) {
              if (map->host[i].iov_base) {
                  abi_ulong target_base = tswapal(map->target[i].iov_base);
                  unlock_user(map->host[i].iov_base, target_base,
                              copy_out ? map->host[i].iov_len : 0);
              }


And wouldn't we want to filter out the iov_base that == 0 since
we may terminate the loop before we get to the count. When the
I/O is done, we'll call it not with the number we mapped, but with
the original number...  Or am I not understanding something here...

I'm not following -- when and why are you adjusting count?


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]