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]
Message-ID: <CAPm50aL9trE88p59KFj-UfEKMji5Ouyjtk=eq55JnSzGZ12WsQ@mail.gmail.com>
Date:   Mon, 6 Sep 2021 16:20:36 +0800
From:   Hao Peng <flyingpenghao@...il.com>
To:     tglx@...utronix.de
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] kernel/irq: Make irq_set_affinity_hint return the real return value

irq_set_affinity_hint does not return the return value of
__irq_set_affinity, which makes the state of functions dependent
on the return value of irq_set_affinity_hint inconsistent.

Signed-off-by: Peng Hao <flyingpeng@...cent.com>
---
 kernel/irq/manage.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index ef30b4762947..86196fb826d6 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -490,6 +490,7 @@ EXPORT_SYMBOL_GPL(irq_force_affinity);
 int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m)
 {
        unsigned long flags;
+       int ret = 0;
        struct irq_desc *desc = irq_get_desc_lock(irq, &flags,
IRQ_GET_DESC_CHECK_GLOBAL);

        if (!desc)
@@ -498,8 +499,8 @@ int irq_set_affinity_hint(unsigned int irq, const
struct cpumask *m)
        irq_put_desc_unlock(desc, flags);
        /* set the initial affinity to prevent every interrupt being on CPU0 */
        if (m)
-               __irq_set_affinity(irq, m, false);
-       return 0;
+               ret = __irq_set_affinity(irq, m, false);
+       return ret;
 }
 EXPORT_SYMBOL_GPL(irq_set_affinity_hint);

--
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ