Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933844AbdGKQSi (ORCPT ); Tue, 11 Jul 2017 12:18:38 -0400 Received: from merlin.infradead.org ([205.233.59.134]:54052 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933789AbdGKQSg (ORCPT ); Tue, 11 Jul 2017 12:18:36 -0400 Date: Tue, 11 Jul 2017 18:18:16 +0200 From: Peter Zijlstra To: Juri Lelli Cc: mingo@redhat.com, rjw@rjwysocki.net, viresh.kumar@linaro.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, tglx@linutronix.de, vincent.guittot@linaro.org, rostedt@goodmis.org, luca.abeni@santannapisa.it, claudio@evidence.eu.com, tommaso.cucinotta@santannapisa.it, bristot@redhat.com, mathieu.poirier@linaro.org, tkjos@android.com, joelaf@google.com, andresoportus@google.com, morten.rasmussen@arm.com, dietmar.eggemann@arm.com, patrick.bellasi@arm.com, Ingo Molnar , "Rafael J . Wysocki" Subject: Re: [RFC PATCH v1 3/8] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE Message-ID: <20170711161816.pqlrkziya6gu5hms@hirez.programming.kicks-ass.net> References: <20170705085905.6558-1-juri.lelli@arm.com> <20170705085905.6558-4-juri.lelli@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170705085905.6558-4-juri.lelli@arm.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 429 Lines: 15 On Wed, Jul 05, 2017 at 09:59:00AM +0100, Juri Lelli wrote: > @@ -4065,6 +4067,9 @@ static int __sched_setscheduler(struct task_struct *p, > } > > if (user) { > + if (attr->sched_flags & SCHED_FLAG_SPECIAL) > + return -EPERM; Should be -EINVAL I think, as if the bit didn't exist at all (it doesn't, from a userspace perspective). > + > retval = security_task_setscheduler(p); > if (retval) > return retval;