genirq/proc: Correctly set file permissions for affinity control files
authorJeff Xie <jeff.xie@linux.dev>
Sun, 25 Aug 2024 13:19:11 +0000 (21:19 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 29 Aug 2024 14:41:42 +0000 (16:41 +0200)
commitc7718e5c76d49b5bb394265383ae51f766d5dd3a
treebbe0046b0a720e286b6fcea5d1dd67153094947d
parent64b6d1d7a84538de34c22a6fc92a7dcc2b196b64
genirq/proc: 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, fixed UP build ]

Signed-off-by: Jeff Xie <jeff.xie@linux.dev>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240825131911.107119-1-jeff.xie@linux.dev
kernel/irq/proc.c