X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=kernel%2Fsched%2Fcore.c;h=677ebad70ce12ea11a89f079c4bcc3c53fa82b3c;hb=8185982aa13b9000ac7c42f936c23cbbb882a31e;hp=9a8a1fc76268c5c3252a744fa7717abb0c1445e2;hpb=1380335fc4c60decaee63e6c462267b0e134bd15;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 9a8a1fc..677ebad 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1322,7 +1322,7 @@ out: * leave kernel. */ if (p->mm && printk_ratelimit()) { - printk_sched("process %d (%s) no longer affine to cpu%d\n", + printk_deferred("process %d (%s) no longer affine to cpu%d\n", task_pid_nr(p), p->comm, cpu); } } @@ -3511,9 +3511,10 @@ static int _sched_setscheduler(struct task_struct *p, int policy, }; /* - * Fixup the legacy SCHED_RESET_ON_FORK hack + * Fixup the legacy SCHED_RESET_ON_FORK hack, except if + * the policy=-1 was passed by sched_setparam(). */ - if (policy & SCHED_RESET_ON_FORK) { + if ((policy != -1) && (policy & SCHED_RESET_ON_FORK)) { attr.sched_flags |= SCHED_FLAG_RESET_ON_FORK; policy &= ~SCHED_RESET_ON_FORK; attr.sched_policy = policy; @@ -3707,7 +3708,7 @@ SYSCALL_DEFINE3(sched_setattr, pid_t, pid, struct sched_attr __user *, uattr, if (retval) return retval; - if (attr.sched_policy < 0) + if ((int)attr.sched_policy < 0) return -EINVAL; rcu_read_lock();