[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMSQXEFfOwsyGM=6STY6k0hCjiJHtz8i8SgBuyX476Ak8+e1Ow@mail.gmail.com>
Date: Mon, 14 Oct 2013 12:49:07 +0200
From: Ivo Sieben <meltedpianoman@...il.com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Thomas Pfaff <tpfaff@....com>,
LKML <linux-kernel@...r.kernel.org>,
RT <linux-rt-users@...r.kernel.org>
Subject: Re: [PATCH] genirq: Set the irq thread policy without checking CAP_SYS_NICE
Patch looks OK to me.. but I'm not an expert.
Regards,
Ivo Sieben
2013/10/11 Sebastian Andrzej Siewior <bigeasy@...utronix.de>:
> From: Thomas Pfaff <tpfaff@....com>
>
> 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 <meltedpianoman@...il.com>
> Cc: stable@...r.kernel.org
> Signed-off-by: Thomas Pfaff <tpfaff@....com>
> [bigeasy: rewrite the changelog]
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> ---
> 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 514bcfd..3e59f95 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -956,7 +956,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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists