[tip: irq/core] genirq/procfs: Correctly set file permissions for affinity control files

tip-bot2 for Jeff Xie
2024-08-27T10:20:26Z

Commit-ID: 413abc4d0f1a1a19713db34ee689609856ffea0e
Gitweb: https://git.kernel.org/tip/413abc4d0f1a1a19713db34ee689609856ffea0e
Author: Jeff Xie <jeff.xie@linux.dev>
AuthorDate: Sun, 25 Aug 2024 21:19:11 +08:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 27 Aug 2024 12:16:40 +02:00

genirq/procfs: Correctly set file permissions for affinity control files

The kernel already knows at the time of interrupt allocation whether
affinity of an interrupt can be controlled by userspace or not.

It still creates all related procfs control files with read/write
permissions. That's inconsistent and non-intuitive for system
administrators and tools.

Therefore set the file permissions to read-only for such interrupts.

[ tglx: Massage change log ]

Signed-off-by: Jeff Xie <jeff.xie@linux.dev>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/all/20240825131911.107119-1-jeff.xie@linux.dev
---
kernel/irq/proc.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 8cccdf4..dcf8190 100644