Skip to content

Commit

Permalink
genirq: Set the irq thread policy without checking CAP_SYS_NICE
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Ivo Sieben <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
tpfaff6130 authored and KAGA-KOKO committed Oct 28, 2013
1 parent fd2f3b7 commit bbfe65c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
goto out_mput;
}

sched_setscheduler(t, SCHED_FIFO, &param);
sched_setscheduler_nocheck(t, SCHED_FIFO, &param);

/*
* We keep the reference to the task struct even if
Expand Down

0 comments on commit bbfe65c

Please sign in to comment.