]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
x86/apic/vector: Make error return value negative
authorThomas Gleixner <tglx@linutronix.de>
Sat, 8 Sep 2018 10:07:26 +0000 (12:07 +0200)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:48:11 +0000 (19:48 -0600)
BugLink: https://bugs.launchpad.net/bugs/1836117
commit 47b7360ce563e18c524ce92b55fb4da72b3b3578 upstream.

activate_managed() returns EINVAL instead of -EINVAL in case of
error. While this is unlikely to happen, the positive return value would
cause further malfunction at the call site.

Fixes: 2db1f959d9dc ("x86/vector: Handle managed interrupts proper")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/x86/kernel/apic/vector.c

index 9f38b4140c270aabb1bed7937f1911839f8d63e7..ace2208e5f00ccfffa21117a9463536ed64b9492 100644 (file)
@@ -422,7 +422,7 @@ static int activate_managed(struct irq_data *irqd)
        if (WARN_ON_ONCE(cpumask_empty(vector_searchmask))) {
                /* Something in the core code broke! Survive gracefully */
                pr_err("Managed startup for irq %u, but no CPU\n", irqd->irq);
-               return EINVAL;
+               return -EINVAL;
        }
 
        ret = assign_managed_vector(irqd, vector_searchmask);