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-next>] [day] [month] [year] [list]
Date:   Sun, 19 Dec 2021 23:29:29 +0800
From:   gchen@...kywalker.com
To:     tglx@...utronix.de
Cc:     linux-kernel@...r.kernel.org, Chen Gang <gchen@...kywalker.com>
Subject: [PATCH] kernel: time: Return ENXIO instead of ENODEV when call smp_call_function_single fail in clockevents_unbind

From: Chen Gang <gchen@...kywalker.com>

smp_call_function_single will return -ENXIO for failure, so ENXIO needs
to be as the default value of cu.res for return instead of ENODEV.

Signed-off-by: Chen Gang <gchen@...kywalker.com>
---
 kernel/time/clockevents.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 003ccf338d20..59b83bee03e6 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -416,7 +416,7 @@ static void __clockevents_unbind(void *arg)
  */
 static int clockevents_unbind(struct clock_event_device *ced, int cpu)
 {
-	struct ce_unbind cu = { .ce = ced, .res = -ENODEV };
+	struct ce_unbind cu = { .ce = ced, .res = -ENXIO };
 
 	smp_call_function_single(cpu, __clockevents_unbind, &cu, 1);
 	return cu.res;
-- 
2.24.0.308.g228f53135a

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ