From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Rostedt Subject: [PATCH RT 1/7] genirq: Set the irq thread policy without checking CAP_SYS_NICE Date: Thu, 21 Nov 2013 11:59:49 -0500 Message-ID: <20131121170116.566903184@goodmis.org> References: <20131121165948.354971355@goodmis.org> Cc: Thomas Gleixner , Carsten Emde , Sebastian Andrzej Siewior , John Kacur , Ivo Sieben , Thomas Pfaff To: linux-kernel@vger.kernel.org, linux-rt-users Return-path: Content-Disposition: inline; filename=0001-genirq-Set-the-irq-thread-policy-without-checking-CA.patch Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-rt-users.vger.kernel.org 3.8.13.13-rt25-rc1 stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Pfaff In commit ee23871389 ("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. Cc: Ivo Sieben Cc: stable@vger.kernel.org Cc: stable-rt@vger.kernel.org Signed-off-by: Thomas Pfaff Signed-off-by: Steven Rostedt [bigeasy: rewrite the changelog] Signed-off-by: Sebastian Andrzej Siewior --- kernel/irq/manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index a3cf48e..a569b71 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -1044,7 +1044,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) goto out_mput; } - sched_setscheduler(t, SCHED_FIFO, ¶m); + sched_setscheduler_nocheck(t, SCHED_FIFO, ¶m); /* * We keep the reference to the task struct even if -- 1.8.4.rc3