From 7d5479c9b78d7dab24a404feb759e8ebf43b0832 Mon Sep 17 00:00:00 2001 From: Pavankumar Kondeti Date: Fri, 16 Jun 2017 09:36:34 +0530 Subject: genirq: Don't allow user space to set IRQ affinity to isolated CPUs The PM_QOS_CPU_DMA_LATENCY QOS request attached to an IRQ is ignored if the IRQ is affined to an isolated CPU. As isolated CPUs enter deep sleep state, it is better not to affine IRQs to those CPUs. Change-Id: Ieab4a04eca222b91159208b21bc9e14390ecd62e Signed-off-by: Pavankumar Kondeti --- kernel/irq/proc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'kernel') diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index a24c5b909047..b05509af0352 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c @@ -114,6 +114,11 @@ static ssize_t write_irq_affinity(int type, struct file *file, goto free_cpumask; } + if (cpumask_subset(new_value, cpu_isolated_mask)) { + err = -EINVAL; + goto free_cpumask; + } + /* * Do not allow disabling IRQs completely - it's a too easy * way to make the system unusable accidentally :-) At least -- cgit v1.2.3