]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
sched: add new API sched_setscheduler_nocheck: add a flag to control access checks
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 23 Jun 2008 03:55:38 +0000 (13:55 +1000)
committerIngo Molnar <mingo@elte.hu>
Mon, 23 Jun 2008 20:57:56 +0000 (22:57 +0200)
commit961ccddd59d627b89bd3dc284b6517833bbdf25d
tree4d755085845b8beeaa0bbc3d3ee66e1ccc4156a8
parent481c5346d0981940ee63037eb53e4e37b0735c10
sched: add new API sched_setscheduler_nocheck: add a flag to control access checks

Hidehiro Kawai noticed that sched_setscheduler() can fail in
stop_machine: it calls sched_setscheduler() from insmod, which can
have CAP_SYS_MODULE without CAP_SYS_NICE.

Two cases could have failed, so are changed to sched_setscheduler_nocheck:
  kernel/softirq.c:cpu_callback()
- CPU hotplug callback
  kernel/stop_machine.c:__stop_machine_run()
- Called from various places, including modprobe()

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Cc: sugita <yumiko.sugita.yf@hitachi.com>
Cc: Satoshi OSHIMA <satoshi.oshima.fk@hitachi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/sched.h
kernel/sched.c
kernel/softirq.c
kernel/stop_machine.c