From: Matthew Wilcox <willy@infradead.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>,
Alexander Egorenkov <egorenar@linux.ibm.com>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>, Baoquan He <bhe@redhat.com>,
Christoph Hellwig <hch@lst.de>,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [PATCH v2 1/1] s390/crash: allow multi-segment iterators
Date: Thu, 7 Jul 2022 20:06:20 +0100 [thread overview]
Message-ID: <YscurHynz2jO1qoe@casper.infradead.org> (raw)
In-Reply-To: <YsbgQLNXbHH30phb@ZenIV>
On Thu, Jul 07, 2022 at 02:31:44PM +0100, Al Viro wrote:
> > @@ -73,10 +73,9 @@ int memcpy_hsa_user(void __user *dest, unsigned long src, size_t count)
> > }
> > offset = src % PAGE_SIZE;
> > bytes = min(PAGE_SIZE - offset, count);
> > - if (copy_to_user(dest, hsa_buf + offset, bytes))
> > + if (copy_to_iter(hsa_buf + offset, bytes, iter) != bytes)
> > return -EFAULT;
>
> Umm... Then you want iov_iter_revert() on short copy...
... maybe better to change the calling convention to return the short
write and have the caller do it if they care?
next prev parent reply other threads:[~2022-07-07 19:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-07 6:01 [PATCH v2 0/1] s390/crash: allow multi-segment iterators Alexander Gordeev
2022-07-07 6:01 ` [PATCH v2 1/1] " Alexander Gordeev
2022-07-07 12:36 ` Al Viro
2022-07-07 12:54 ` Matthew Wilcox
2022-07-07 13:31 ` Al Viro
2022-07-07 19:06 ` Matthew Wilcox [this message]
2022-07-13 11:17 ` Alexander Gordeev
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=YscurHynz2jO1qoe@casper.infradead.org \
--to=willy@infradead.org \
--cc=agordeev@linux.ibm.com \
--cc=bhe@redhat.com \
--cc=egorenar@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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