Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753597AbaAQUOe (ORCPT ); Fri, 17 Jan 2014 15:14:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43416 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753155AbaAQUOb (ORCPT ); Fri, 17 Jan 2014 15:14:31 -0500 Date: Fri, 17 Jan 2014 21:09:23 +0100 From: Oleg Nesterov To: Alex Thorlton Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Andrew Morton , "Kirill A. Shutemov" , Benjamin Herrenschmidt , Rik van Riel , Naoya Horiguchi , "Eric W. Biederman" , Andy Lutomirski , Al Viro , Kees Cook , Andrea Arcangeli Subject: Re: [RFC PATCHv2 1/2] Add mm flag to control THP Message-ID: <20140117200923.GA15234@redhat.com> References: <1bc8f911363af956b37d8ea415d734f3191f1c78.1389905087.git.athorlton@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1bc8f911363af956b37d8ea415d734f3191f1c78.1389905087.git.athorlton@sgi.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/