Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
"Three small fixes"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/clock: Prevent tracing recursion in sched_clock_cpu()
stop_machine: Fix^2 race between stop_two_cpus() and stop_cpus()
sched/deadline: Deny unprivileged users to set/change SCHED_DEADLINE policy

Changed files
+12 -3
kernel
+2 -2
kernel/sched/clock.c
··· 301 301 if (unlikely(!sched_clock_running)) 302 302 return 0ull; 303 303 304 - preempt_disable(); 304 + preempt_disable_notrace(); 305 305 scd = cpu_sdc(cpu); 306 306 307 307 if (cpu != smp_processor_id()) 308 308 clock = sched_clock_remote(scd); 309 309 else 310 310 clock = sched_clock_local(scd); 311 - preempt_enable(); 311 + preempt_enable_notrace(); 312 312 313 313 return clock; 314 314 }
+9
kernel/sched/core.c
··· 3338 3338 return -EPERM; 3339 3339 } 3340 3340 3341 + /* 3342 + * Can't set/change SCHED_DEADLINE policy at all for now 3343 + * (safest behavior); in the future we would like to allow 3344 + * unprivileged DL tasks to increase their relative deadline 3345 + * or reduce their runtime (both ways reducing utilization) 3346 + */ 3347 + if (dl_policy(policy)) 3348 + return -EPERM; 3349 + 3341 3350 /* 3342 3351 * Treat SCHED_IDLE as nice 20. Only allow a switch to 3343 3352 * SCHED_NORMAL if the RLIMIT_NICE would normally permit it.
+1 -1
kernel/stop_machine.c
··· 293 293 */ 294 294 smp_call_function_single(min(cpu1, cpu2), 295 295 &irq_cpu_stop_queue_work, 296 - &call_args, 0); 296 + &call_args, 1); 297 297 lg_local_unlock(&stop_cpus_lock); 298 298 preempt_enable(); 299 299