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: <1547694009-16261-1-git-send-email-chenhc@lemote.com>
Date:   Thu, 17 Jan 2019 11:00:09 +0800
From:   Huacai Chen <chenhc@...ote.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     linux-kernel@...r.kernel.org, Fuxin Zhang <zhangfx@...ote.com>,
        Zhangjin Wu <wuzhangjin@...il.com>,
        Huacai Chen <chenhuacai@...il.com>,
        Huacai Chen <chenhc@...ote.com>,
        Dou Liyang <douliyangs@...il.com>
Subject: [PATCH] genirq/irqdesc: Fix a bug in alloc_descs()

Commit c410abbbacb9b378365b ("genirq/affinity: Add is_managed to struct
irq_affinity_desc") introduce a bug in the for-loop in alloc_descs() by
accident. So fix it.

Fixes: c410abbbacb9b378365b ("genirq/affinity: Add is_managed to struct irq_affinity_desc")
Cc: Dou Liyang <douliyangs@...il.com>
Signed-off-by: Huacai Chen <chenhc@...ote.com>
---
 kernel/irq/irqdesc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index ee062b7..ef8ad36 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -457,7 +457,7 @@ static int alloc_descs(unsigned int start, unsigned int cnt, int node,
 
 	/* Validate affinity mask(s) */
 	if (affinity) {
-		for (i = 0; i < cnt; i++, i++) {
+		for (i = 0; i < cnt; i++) {
 			if (cpumask_empty(&affinity[i].mask))
 				return -EINVAL;
 		}
-- 
2.7.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ