Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags
From: Michal Hocko
Date: Thu Oct 20 2016 - 15:27:13 EST
On Wed 19-10-16 10:23:55, Dave Hansen wrote:
> On 10/19/2016 10:01 AM, Michal Hocko wrote:
> > The question I had earlier was whether this has to be an explicit FOLL
> > flag used by g-u-p users or we can just use it internally when mm !=
> > current->mm
>
> The reason I chose not to do that was that deferred work gets run under
> a basically random 'current'. If we just use 'mm != current->mm', then
> the deferred work will sometimes have pkeys enforced and sometimes not,
> basically randomly.
OK, I see (async_pf_execute and ksm ). It makes more sense to me. Thanks
for the clarification.
--
Michal Hocko
SUSE Labs