[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wg8O4NBTUr9GvNo=vnUmONUGYypN4dFr7QNEGUFcN=tBw@mail.gmail.com>
Date: Fri, 10 Sep 2021 12:04:28 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Jens Axboe <axboe@...nel.dk>,
Pavel Begunkov <asml.silence@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [git pull] iov_iter fixes
On Fri, Sep 10, 2021 at 11:50 AM Al Viro <viro@...iv.linux.org.uk> wrote:
>
> I think that sizeof(struct bio_vec) != sizeof(struct iovec):
Ooh, very good catch.
That would cause some *very* odd and subtle errors, since it just
happens to work on 64-bit, and then causes very confusing pointer
arithmetic errors on 32-bit.
So yeah, that
i->iov -= state->nr_segs - i->nr_segs;
doesn't work after all, comment or not.
So only 'struct iovec' and 'struct kvec' actually have the same format
and can be used interchangeably.
Linus
Powered by blists - more mailing lists