{"push_id":1106255896,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"4409d913f7ceb53e0603a9bd43ffffacc44a7ce8","before":"e67c435ddddee2e1b9afa212254d28fa044c5ee7","commits":[{"sha":"4409d913f7ceb53e0603a9bd43ffffacc44a7ce8","author":{"email":"5cb699227be62d301a8938d918ca915ca6724ab0@gmail.com","name":"robcore"},"message":"From bc46c701d36f1d7f85aae711cec0c18abb446b6e Mon Sep 17 00:00:00 2001\nFrom: Peter Zijlstra <peterz@infradead.org>\nDate: Wed, 15 Jan 2014 16:33:20 +0100\nSubject: [PATCH 1974/6902] sched: Fix up scheduler syscall LTP fails\n\nWu reported LTP failures:\n\n  > ltp.sched_setparam02.1.TFAIL\n  > ltp.sched_setparam02.2.TFAIL\n  > ltp.sched_setparam02.3.TFAIL\n  > ltp.sched_setparam03.1.TFAIL\n\nThere were 2 things wrong; firstly __setscheduler() failed on\nsched_setparam()'s policy = -1, fix that by reading from p->policy in\nthat case.\n\nSecondly, getparam() (and getattr()) would still report !0\nsched_priority for !FIFO/RR tasks after having been such. So\nunconditionally set p->rt_priority.\n\nReported-by: Fengguang Wu <fengguang.wu@intel.com>\nSigned-off-by: Peter Zijlstra <peterz@infradead.org>\nCc: Juri Lelli <juri.lelli@gmail.com>\nCc: Dario Faggioli <raistlin@linux.it>\nLink: http://lkml.kernel.org/r/20140115153320.GH31570@twins.programming.kicks-ass.net\nSigned-off-by: Ingo Molnar <mingo@kernel.org>\nSigned-off-by: Pranav Vashi <neobuddy89@gmail.com>\n---\n kernel/sched/core.c | 14 +++++++++++---\n 1 file changed, 11 insertions(+), 3 deletions(-)\n\ndiff --git a/kernel/sched/core.c b/kernel/sched/core.c\nindex ae068df..289651f 100644\n--- a/kernel/sched/core.c\n+++ b/kernel/sched/core.c\n@@ -4068,15 +4068,23 @@ static void __setscheduler(struct rq *rq, struct task_struct *p,\n {\n \tint policy = attr->sched_policy;\n\n+\tif (policy == -1) /* setparam */\n+\t\tpolicy = p->policy;\n+\n \tp->policy = policy;\n\n \tif (dl_policy(policy))\n \t\t__setparam_dl(p, attr);\n-\telse if (rt_policy(policy))\n-\t\tp->rt_priority = attr->sched_priority;\n-\telse\n+\telse if (fair_policy(policy))\n \t\tp->static_prio = NICE_TO_PRIO(attr->sched_nice);\n\n+\t/*\n+\t * __sched_setscheduler() ensures attr->sched_priority == 0 when\n+\t * !rt_policy. Always setting this ensures that things like\n+\t * getparam()/getattr() don't report silly values for !rt tasks.\n+\t */\n+\tp->rt_priority = attr->sched_priority;\n+\n \tp->normal_prio = normal_prio(p);\n \tp->prio = rt_mutex_getprio(p);\n\n--\n2.8.1","distinct":true,"url":"https://api.github.com/repos/robcore/S4-AEL-Kernel-Lollipop/commits/4409d913f7ceb53e0603a9bd43ffffacc44a7ce8"}]}