lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <172494277829.2215.4612784053370186889.tip-bot2@tip-bot2>
Date: Thu, 29 Aug 2024 14:46:18 -0000
From: "tip-bot2 for Jeff Xie" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Jeff Xie <jeff.xie@...ux.dev>, Thomas Gleixner <tglx@...utronix.de>,
 x86@...nel.org, linux-kernel@...r.kernel.org, maz@...nel.org
Subject: [tip: irq/core] genirq/proc: Change the return value for set affinity
 permission error

The following commit has been merged into the irq/core branch of tip:

Commit-ID:     eb29369fa543e7d5557c19ebecf072244bb14815
Gitweb:        https://git.kernel.org/tip/eb29369fa543e7d5557c19ebecf072244bb14815
Author:        Jeff Xie <jeff.xie@...ux.dev>
AuthorDate:    Mon, 26 Aug 2024 22:58:05 +08:00
Committer:     Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Thu, 29 Aug 2024 16:42:06 +02:00

genirq/proc: Change the return value for set affinity permission error

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

Change the return value to -EPERM as that reflects the cause of error
correctly.

Signed-off-by: Jeff Xie <jeff.xie@...ux.dev>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://lore.kernel.org/all/20240826145805.5938-1-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 d98fb9c..9081ada 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -140,7 +140,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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ