[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190408141313.GU22763@bombadil.infradead.org>
Date: Mon, 8 Apr 2019 07:13:13 -0700
From: Matthew Wilcox <willy@...radead.org>
To: Huang Shijie <sjhuang@...vatar.ai>
Cc: akpm@...ux-foundation.org, william.kucharski@...cle.com,
ira.weiny@...el.com, palmer@...ive.com, axboe@...nel.dk,
keescook@...omium.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] mm/gup.c: fix the wrong comments
On Mon, Apr 08, 2019 at 10:37:45AM +0800, Huang Shijie wrote:
> When CONFIG_HAVE_GENERIC_GUP is defined, the kernel will use its own
> get_user_pages_fast().
>
> In the following scenario, we will may meet the bug in the DMA case:
> .....................
> get_user_pages_fast(start,,, pages);
> ......
> sg_alloc_table_from_pages(, pages, ...);
> .....................
>
> The root cause is that sg_alloc_table_from_pages() requires the
> page order to keep the same as it used in the user space, but
> get_user_pages_fast() will mess it up.
I don't understand how get_user_pages_fast() can return the pages in a
different order in the array from the order they appear in userspace.
Can you explain?
Powered by blists - more mailing lists