[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140117200923.GA15234@redhat.com>
Date: Fri, 17 Jan 2014 21:09:23 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Alex Thorlton <athorlton@....com>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Rik van Riel <riel@...hat.com>,
Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Andy Lutomirski <luto@...capital.net>,
Al Viro <viro@...iv.linux.org.uk>,
Kees Cook <keescook@...omium.org>,
Andrea Arcangeli <aarcange@...hat.com>
Subject: Re: [RFC PATCHv2 1/2] Add mm flag to control THP
On 01/16, Alex Thorlton wrote:
>
> + case PR_GET_THP_DISABLE:
> + error = put_user(test_bit(MMF_THP_DISABLE,
> + &me->mm->flags),
> + (int __user *) arg2);
> + break;
Do we really want put_user?
error = test_bit(MMF_THP_DISABLE);
can work too and looks simpler (and to me simpler to use in userspace).
PR_GET_DUMPABLE works this way.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists