Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1656514imu; Thu, 17 Jan 2019 00:50:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN6WhmgSYoql2/gr5vg9ac1f//W+0HAUNI9mfsxyvkxfA5GETClp17R0PXUkNhLQl6LvJqL5 X-Received: by 2002:a17:902:f01:: with SMTP id 1mr13783964ply.143.1547715036849; Thu, 17 Jan 2019 00:50:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547715036; cv=none; d=google.com; s=arc-20160816; b=DnwNRBYY9A2mDKiGSrToSNJ3rHRrNayyR+aNjjRrpblS3VFAqbE78pA2XnE65VGogy YJqhaHGpa2qACkkhpJHzWg7duvnFIwmKM9A/YH5SpKV5abBXqZUdT4I1RSfwBNd2s/dJ rbyPPIheePiWOoLqo7EynPz2Up5KAOYJEVfEdXJd0sjVB/pjJONNWIdOr57XnCNDtlmD 6MC/w7Y4+xGIOrCys2AZ5M+bNqtm/PPonfFxP5v5OG47+6WIiDgZOTDWldNO4ek50wif qluEsPCxVTfMMZfGcsZvIclW0JhVBpA3moq14FOT5ESsscBxutNNstb30NpJMiBbjnk9 Bksg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=90CAwvAW+8yAT7s5ufvgTTWTn7ZZm+MK/ndwsWAACI0=; b=fvbd9PvzXU+r0z0kOGg2HYYj46kg5VTU7TjHgwI2d7viwIWWW7n3f0Qjno68u++t76 4nB1LPr5TTAlXgihTPkPR21GpfN8mMB854Eo4wpPevQMa0Kq4INTgo2MlvFHe3DNFP9e ss9Qb8v1WSpN8BFP3Yr7bgvEVQWuIEvS9gFfjJtGuifPHJH14tEMVLHdGH9NHvRRxA1Q 7XQFtrR/b90yxJNxF8iFoJkXHb//y2bJ3XKE5S6lV7kTdxPbs/LPq/7IaEb9R4wKxfhr tZNQPpmHl3/lW3mzRZ3z5hbjZUkmuBXf9DM/1PwTgwWoXssI/fX3/suKOC0eBYf7f76T W40Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="Oc/Y463V"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q70si266102pgq.526.2019.01.17.00.50.21; Thu, 17 Jan 2019 00:50:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="Oc/Y463V"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727639AbfAQC6Y (ORCPT + 99 others); Wed, 16 Jan 2019 21:58:24 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:38919 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727541AbfAQC6Y (ORCPT ); Wed, 16 Jan 2019 21:58:24 -0500 Received: by mail-pg1-f193.google.com with SMTP id w6so3742217pgl.6 for ; Wed, 16 Jan 2019 18:58:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=90CAwvAW+8yAT7s5ufvgTTWTn7ZZm+MK/ndwsWAACI0=; b=Oc/Y463VjhEFUgwME4zD/8QV0pKvXIr80MX1YGxDPWOzRXYd5Kt7zE0N+kqeP3poM5 DM2ijqA2jDzYtl145iHOCPNrB19xiwtyonuNc70cNfYr8VTr9Q4xwvsVVpOQG4/IZjrw b5eUhXQqZOvOmwdtJXIQj+9epKiTrg+jDW7ZHzN91t4KONjcWEXjN63CMOLIMhsCTfLh mpkHCCdm7nV+K4Wy146rzi+1i0H2EMyJAS7Lmfwuk2+jhz3PMXg8J3+jgf/4j5UQ77Ki FgfwLP8+0LV6iVZRt8Zf+DKHoq8C8c6OdZnx7q3IkvKpOJbwyaWTEU7eNq3FSvvW301H EztA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=90CAwvAW+8yAT7s5ufvgTTWTn7ZZm+MK/ndwsWAACI0=; b=Xt8sTJY7tbQnm05fUUoFtsG1yPk0CLIjhhX/dFqdhlpFemdwLIX4S9LB3bO4t1iAKN pVDqEOKRtfw0GXhtOppidREB4DWI11mFfSArDGaVoZJu0ni6J9SgVQEO0HTjgMPXKp83 9hZ6ecH73hx22ohgCeY+Jul7M2Nvz6b0oYO4gwJh8M3zyDaoTvd/yh0wmBU/F2+fMeOr /uUg9JCsq3KlUHV7TY5TanWCVeI2rFejQrX6PoN9jCM05m66Sz3qy6a3H9iBonAA1QnW vAU9MwqM/0QbzhdS/s9xrlkCmRLpvMHVMRHqUktJrJXGprwEQ0sOe2HGiR+qyUrVyKZq 9h6A== X-Gm-Message-State: AJcUukdj5hEyBwkDnFt/Yr6feIpCqZsxzH7DHMzHqhXmFfW3b1E91cH0 ufBZD9f2KbJC1/B19DLD9gk= X-Received: by 2002:a63:4e41:: with SMTP id o1mr12102567pgl.282.1547693903610; Wed, 16 Jan 2019 18:58:23 -0800 (PST) Received: from software.domain.org ([172.247.34.138]) by smtp.gmail.com with ESMTPSA id x26sm241459pfn.50.2019.01.16.18.58.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Jan 2019 18:58:22 -0800 (PST) From: Huacai Chen To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, Fuxin Zhang , Zhangjin Wu , Huacai Chen , Huacai Chen , Dou Liyang Subject: [PATCH] genirq/irqdesc: Fix a bug in alloc_descs() Date: Thu, 17 Jan 2019 11:00:09 +0800 Message-Id: <1547694009-16261-1-git-send-email-chenhc@lemote.com> X-Mailer: git-send-email 2.7.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Huacai Chen --- 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