[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wg5mww3StP8HqPN4d5eij3KmEayM743v-nDKAMgRe2J6g@mail.gmail.com>
Date: Mon, 3 Jun 2019 09:08:43 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Christoph Hellwig <hch@....de>
Cc: Paul Burton <paul.burton@...s.com>,
James Hogan <jhogan@...nel.org>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Rich Felker <dalias@...c.org>,
"David S. Miller" <davem@...emloft.net>,
Nicholas Piggin <npiggin@...il.com>,
Khalid Aziz <khalid.aziz@...cle.com>,
Andrey Konovalov <andreyknvl@...gle.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
linux-mips@...r.kernel.org,
Linux-sh list <linux-sh@...r.kernel.org>,
sparclinux@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
Linux-MM <linux-mm@...ck.org>,
"the arch/x86 maintainers" <x86@...nel.org>,
Linux List Kernel Mailing <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 03/16] mm: simplify gup_fast_permitted
On Mon, Jun 3, 2019 at 12:41 AM Christoph Hellwig <hch@....de> wrote:
>
> I only removed a duplicate of it.
I don't see any remaining cases.
> The full (old) code in get_user_pages_fast() looks like this:
>
> if (nr_pages <= 0)
> return 0;
>
> if (unlikely(!access_ok((void __user *)start, len)))
> return -EFAULT;
>
> if (gup_fast_permitted(start, nr_pages)) {
Yes, and that code was correct.
The new code has no test at all for "nr_pages == 0", afaik.
Linus
Powered by blists - more mailing lists