The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] genirq/procfs: Change the return value for set affinity permission error
@ 2024-08-26 14:58 Jeff Xie
  2024-08-29 14:46 ` [tip: irq/core] genirq/proc: " tip-bot2 for Jeff Xie
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Xie @ 2024-08-26 14:58 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, xiehuan09, Jeff Xie

Currently, when the affinity of an irq cannot be set due to lack of
permission, the write_irq_affinity() returns the error code -EIO

Obviously, due to a permissions error, it should return -EPERM

Signed-off-by: Jeff Xie <jeff.xie@linux.dev>
---
 kernel/irq/proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index dcf8190a58ca..7b3a4c92d148 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -142,7 +142,7 @@ static ssize_t write_irq_affinity(int type, struct file *file,
 	int err;
 
 	if (!irq_can_set_affinity_usr(irq) || no_irq_affinity)
-		return -EIO;
+		return -EPERM;
 
 	if (!zalloc_cpumask_var(&new_value, GFP_KERNEL))
 		return -ENOMEM;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-29 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26 14:58 [PATCH] genirq/procfs: Change the return value for set affinity permission error Jeff Xie
2024-08-29 14:46 ` [tip: irq/core] genirq/proc: " tip-bot2 for Jeff Xie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox