From: Jeff Xie <jeff.xie@linux.dev>
To: tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org, xiehuan09@gmail.com,
Jeff Xie <jeff.xie@linux.dev>
Subject: [PATCH] genirq/procfs: Change the return value for set affinity permission error
Date: Mon, 26 Aug 2024 22:58:05 +0800 [thread overview]
Message-ID: <20240826145805.5938-1-jeff.xie@linux.dev> (raw)
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
next reply other threads:[~2024-08-26 14:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-26 14:58 Jeff Xie [this message]
2024-08-29 14:46 ` [tip: irq/core] genirq/proc: Change the return value for set affinity permission error tip-bot2 for Jeff Xie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240826145805.5938-1-jeff.xie@linux.dev \
--to=jeff.xie@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=xiehuan09@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.