[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFqt6zY0wGGL2gkL9Vi3udEp3xNUzUoGmuJpj_H1ff7EBYr-qw@mail.gmail.com>
Date: Tue, 23 Jun 2020 00:58:32 +0530
From: Souptick Joarder <jrdr.linux@...il.com>
To: Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc: John Hubbard <jhubbard@...dia.com>,
Juergen Gross <jgross@...e.com>, sstabellini@...nel.org,
xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
paul@....org
Subject: Re: [RFC PATCH] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()
On Tue, Jun 23, 2020 at 12:40 AM Boris Ostrovsky
<boris.ostrovsky@...cle.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 ?
>
> Do you mind fixing that we well? Then you should be able to avoid
> testing pages in a loop.
Ok, let me try to fix it.
>
>
> -boris
>
Powered by blists - more mailing lists