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: <tip-bddda606ec76550dd63592e32a6e87e7d32583f7@git.kernel.org>
Date:   Tue, 15 Jan 2019 02:27:55 -0800
From:   tip-bot for Srinivas Ramana <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     mingo@...nel.org, tglx@...utronix.de, hpa@...or.com,
        linux-kernel@...r.kernel.org, sramana@...eaurora.org
Subject: [tip:irq/urgent] genirq: Make sure the initial affinity is not
 empty

Commit-ID:  bddda606ec76550dd63592e32a6e87e7d32583f7
Gitweb:     https://git.kernel.org/tip/bddda606ec76550dd63592e32a6e87e7d32583f7
Author:     Srinivas Ramana <sramana@...eaurora.org>
AuthorDate: Thu, 20 Dec 2018 19:05:57 +0530
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Tue, 15 Jan 2019 11:23:27 +0100

genirq: Make sure the initial affinity is not empty

If all CPUs in the irq_default_affinity mask are offline when an interrupt
is initialized then irq_setup_affinity() can set an empty affinity mask for
a newly allocated interrupt.

Fix this by falling back to cpu_online_mask in case the resulting affinity
mask is zero.

Signed-off-by: Srinivas Ramana <sramana@...eaurora.org>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-arm-msm@...r.kernel.org
Link: https://lkml.kernel.org/r/1545312957-8504-1-git-send-email-sramana@codeaurora.org

---
 kernel/irq/manage.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index a4888ce4667a..84b54a17b95d 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -393,6 +393,9 @@ int irq_setup_affinity(struct irq_desc *desc)
 	}
 
 	cpumask_and(&mask, cpu_online_mask, set);
+	if (cpumask_empty(&mask))
+		cpumask_copy(&mask, cpu_online_mask);
+
 	if (node != NUMA_NO_NODE) {
 		const struct cpumask *nodemask = cpumask_of_node(node);
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ