Skip to content

Commit bbfe65c

Browse files
tpfaff6130KAGA-KOKO
authored andcommitted
genirq: Set the irq thread policy without checking CAP_SYS_NICE
In commit ee23871 ("genirq: Set irq thread to RT priority on creation") we moved the assigment of the thread's priority from the thread's function into __setup_irq(). That function may run in user context for instance if the user opens an UART node and then driver calls requests in the ->open() callback. That user may not have CAP_SYS_NICE and so the irq thread won't run with the SCHED_OTHER policy. This patch uses sched_setscheduler_nocheck() so we omit the CAP_SYS_NICE check which is otherwise required for the SCHED_OTHER policy. [bigeasy: Rewrite the changelog] Signed-off-by: Thomas Pfaff <tpfaff@pcs.com> Cc: Ivo Sieben <meltedpianoman@gmail.com> Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1381489240-29626-1-git-send-email-bigeasy@linutronix.de Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent fd2f3b7 commit bbfe65c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/irq/manage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
956956
goto out_mput;
957957
}
958958

959-
sched_setscheduler(t, SCHED_FIFO, &param);
959+
sched_setscheduler_nocheck(t, SCHED_FIFO, &param);
960960

961961
/*
962962
* We keep the reference to the task struct even if

0 commit comments

Comments
 (0)