On 3/28/23 4:30?PM, Linus Torvalds wrote: > thing > > On Tue, Mar 28, 2023 at 3:19?PM Jens Axboe <axboe@xxxxxxxxx> wrote: >> >> Nobody should use it, though. The one case where I thought we'd use >> it was iov_iter_iovec(), but that doesn't work... > > You only think that because all your conversions are bogus and wrong. > > Your latest "[PATCH 7/9] ALSA: pcm.. " patch is just wrong. > > Doing this: > > - if (!iter_is_iovec(from)) > + if (!from->user_backed) > > does not work AT ALL. You also need to switch all the uses of > "from->iov" to use the "iter_iov()" helper (that you didn't use). > > Because "from->iov" is _only_ valid as a iov pointer for an ITER_IOV. > > For an ITER_UBUF, that will be the user pointer in the union, and to > get the iov, you need to do that > > iov = &from->ubuf_iov > > thing. > > The "overlay ubuf as an iov" does *not* make "from->iov" work at all. > Really. You still need to *generate* that pointer from the overlaid > data. > > So your latest patches may build, but they most definitely won't work. > > I would in fact suggest renaming the "iov" member entirely, to make > sure that nobody uses the "direct access" model ever. Yeah ok, I see what you mean now. I'll rework it and post something tomorrow when it looks sane. -- Jens Axboe