When a process loads a kernel module, __stop_machine_run() is called, and it calls sched_setscheduler() to give newly created kernel threads highest priority. However, the process can have no CAP_SYS_NICE which required for sched_setscheduler() to increase the priority. For example, SystemTap loads its module with only CAP_SYS_MODULE. In this case, sched_setscheduler() returns -EPERM, then BUG() is called. Failure of sched_setscheduler() wouldn't be a real problem, so this patch just ignores it. Or, should we give the CAP_SYS_NICE capability temporarily? Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> --- kernel/stop_machine.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Index: linux-2.6.26-rc5-mm3/kernel/stop_machine.c =================================================================== --- linux-2.6.26-rc5-mm3.orig/kernel/stop_machine.c +++ linux-2.6.26-rc5-mm3/kernel/stop_machine.c @@ -143,8 +143,7 @@ int __stop_machine_run(int (*fn)(void *) kthread_bind(threads[i], i); /* Make it highest prio. */ - if (sched_setscheduler(threads[i], SCHED_FIFO, ¶m) != 0) - BUG(); + sched_setscheduler(threads[i], SCHED_FIFO, ¶m); } /* We've created all the threads. Wake them all: hold this CPU so one --
| Heiko Carstens | [patch -mm] s390: struct bin_attribute changes |
| Andrew Morton | 2.6.25-rc2-mm1 |
| Eric W. Biederman | Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels on boot cpu |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jens Axboe | Re: [BUG] New Kernel Bugs |
| Andrew Morton | Re: [PATCH] PHYLIB: IRQ event workqueue handling fixes |
