From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Souptick Joarder <jrdr.linux@gmail.com>
Cc: John Hubbard <jhubbard@nvidia.com>,
Juergen Gross <jgross@suse.com>,
sstabellini@kernel.org, xen-devel@lists.xenproject.org,
linux-kernel@vger.kernel.org, paul@xen.org
Subject: Re: [RFC PATCH] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()
Date: Mon, 22 Jun 2020 15:25:38 -0400 [thread overview]
Message-ID: <bcb38427-ed3c-400e-81eb-4e30a11b2ffa@oracle.com> (raw)
In-Reply-To: <CAFqt6zY0wGGL2gkL9Vi3udEp3xNUzUoGmuJpj_H1ff7EBYr-qw@mail.gmail.com>
On 6/22/20 3:28 PM, Souptick Joarder wrote:
> On Tue, Jun 23, 2020 at 12:40 AM Boris Ostrovsky
> <boris.ostrovsky@oracle.com> wrote:
>> On 6/22/20 2:52 PM, Souptick Joarder wrote:
>>> I read the code again. I think, this check is needed to handle a scenario when
>>> lock_pages() return -ENOSPC. Better to keep this check. Let me post v2 of this
>>> RFC for a clear view.
>>
>> Actually, error handling seems to be somewhat broken here. If
>> lock_pages() returns number of pinned pages then that's what we end up
>> returning from privcmd_ioctl_dm_op(), all the way to user ioctl(). Which
>> I don't think is right, we should return proper (negative) error.
>>
> What -ERRNO is more appropriate here ? -ENOSPC ?
You can simply pass along error code that get_user_pages_fast() returned.
-boris
next prev parent reply other threads:[~2020-06-22 19:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-17 3:14 [RFC PATCH] xen/privcmd: Convert get_user_pages*() to pin_user_pages*() Souptick Joarder
2020-06-17 17:57 ` Boris Ostrovsky
2020-06-19 3:12 ` Souptick Joarder
2020-06-19 7:30 ` John Hubbard
2020-06-22 18:52 ` Souptick Joarder
2020-06-22 19:10 ` Boris Ostrovsky
2020-06-22 19:28 ` Souptick Joarder
2020-06-22 19:25 ` Boris Ostrovsky [this message]
2020-06-19 9:03 ` Paul Durrant
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=bcb38427-ed3c-400e-81eb-4e30a11b2ffa@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=jgross@suse.com \
--cc=jhubbard@nvidia.com \
--cc=jrdr.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@xen.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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