Re: [PATCH 02/33] mm: overload get_user_pages() functions

From: Dave Hansen
Date: Wed Feb 17 2016 - 13:16:04 EST


On 02/16/2016 12:36 AM, Ingo Molnar wrote:
>> > From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
>> >
>> > The concept here was a suggestion from Ingo. The implementation
>> > horrors are all mine.
>> >
>> > This allows get_user_pages(), get_user_pages_unlocked(), and
>> > get_user_pages_locked() to be called with or without the
>> > leading tsk/mm arguments. We will give a compile-time warning
>> > about the old style being __deprecated and we will also
>> > WARN_ON() if the non-remote version is used for a remote-style
>> > access.
> So at minimum this should be WARN_ON_ONCE(), to make it easier to recover some
> meaningful kernel log from such incidents.

I went to go fix this in the code but realized that I coded it up as
WARN_ONCE(). The description was just imprecise. So I won't be sending
a code fix for this.