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: <1387809552-20529-1-git-send-email-prarit@redhat.com>
Date:	Mon, 23 Dec 2013 09:39:12 -0500
From:	Prarit Bhargava <prarit@...hat.com>
To:	linux-kernel@...r.kernel.org
Cc:	Prarit Bhargava <prarit@...hat.com>,
	Michel Lespinasse <walken@...gle.com>,
	Seiji Aguchi <seiji.aguchi@....com>,
	Yang Zhang <yang.z.zhang@...el.com>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Janet Morgan <janet.morgan@...el.com>,
	Tony Luck <tony.luck@...el.com>,
	Ruiv Wang <ruiv.wang@...il.com>,
	Gong Chen <gong.chen@...ux.intel.com>,
	Andi Kleen <ak@...ux.intel.com>,
	"H. Peter Anvin" <hpa@...ux.intel.com>, x86@...nel.org,
	<stable@...r.kernel.org>
Subject: [PATCH] x86, irq, fix logical AND/OR error in check_irq_vectors_for_cpu_disable()

Patch is against linux-tip.git and was tested on both linux.git and tip without
any issues.  As expected, the number of required vectors for the down'd cpu
drops from 202 to 181 on my test system (which has 509 vectors assigned in
total).

Many thanks to Gong Chen for catching this.

P.

----8<----

Gong Chen caught this coding error during inspection of the patch.  The
code should be AND not OR.

Signed-off-by: Prarit Bhargava <prarit@...hat.com>
Cc: Michel Lespinasse <walken@...gle.com>
Cc: Seiji Aguchi <seiji.aguchi@....com>
Cc: Yang Zhang <yang.z.zhang@...el.com>
Cc: Paul Gortmaker <paul.gortmaker@...driver.com>
Cc: Janet Morgan <janet.morgan@...el.com>
Cc: Tony Luck <tony.luck@...el.com>
Cc: Ruiv Wang <ruiv.wang@...il.com>
Cc: Gong Chen <gong.chen@...ux.intel.com>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: H. Peter Anvin <hpa@...ux.intel.com>
Cc: x86@...nel.org
Cc: <stable@...r.kernel.org>
---
 arch/x86/kernel/irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index 7d40698..aed7acc 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -281,7 +281,7 @@ int check_irq_vectors_for_cpu_disable(void)
 			desc = irq_to_desc(irq);
 			data = irq_desc_get_irq_data(desc);
 			affinity = data->affinity;
-			if (irq_has_action(irq) || !irqd_is_per_cpu(data) ||
+			if (irq_has_action(irq) && !irqd_is_per_cpu(data) &&
 			    !cpumask_subset(affinity, cpu_online_mask))
 				this_count++;
 		}
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ