summaryrefslogtreecommitdiff
path: root/kernel/irq/proc.c
diff options
context:
space:
mode:
authorPavankumar Kondeti <pkondeti@codeaurora.org>2017-06-16 09:36:34 +0530
committerPavankumar Kondeti <pkondeti@codeaurora.org>2017-06-30 10:41:00 +0530
commit7d5479c9b78d7dab24a404feb759e8ebf43b0832 (patch)
tree109920a4f62efa07118007fd2844ca235756e976 /kernel/irq/proc.c
parent971af7d6edebc1ba813b7a1248bc4f1d6d763c97 (diff)
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 <pkondeti@codeaurora.org>
Diffstat (limited to 'kernel/irq/proc.c')
-rw-r--r--kernel/irq/proc.c5
1 files changed, 5 insertions, 0 deletions
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