Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1355683 > unrolled thread

[patch] irqchip: irq-alpine-msi: releasing the wrong variable on error

Started byDan Carpenter <dan.carpenter@oracle.com>
First post2016-03-11 09:20 +0100
Last post2016-03-11 10:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [patch] irqchip: irq-alpine-msi: releasing the wrong variable on  error Dan Carpenter <dan.carpenter@oracle.com> - 2016-03-11 09:20 +0100
    [tip:irq/core] irqchip/irq-alpine-msi: Release the correct domain  on error tip-bot for Dan Carpenter <tipbot@zytor.com> - 2016-03-11 10:20 +0100

#1355683 — [patch] irqchip: irq-alpine-msi: releasing the wrong variable on error

FromDan Carpenter <dan.carpenter@oracle.com>
Date2016-03-11 09:20 +0100
Subject[patch] irqchip: irq-alpine-msi: releasing the wrong variable on error
Message-ID<rbqsG-3iZ-11@gated-at.bofh.it>
The "msi_domain" variable is NULL here so it leads to a NULL
dereference.  It looks like we actually intended to free
"middle_domain".

Fixes: e6b78f2c3e14 ('irqchip: Add the Alpine MSIX interrupt controller')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c
index f871272..2538425 100644
--- a/drivers/irqchip/irq-alpine-msi.c
+++ b/drivers/irqchip/irq-alpine-msi.c
@@ -220,7 +220,7 @@ static int alpine_msix_init_domains(struct alpine_msix_data *priv,
 					       middle_domain);
 	if (!msi_domain) {
 		pr_err("Failed to create MSI domain\n");
-		irq_domain_remove(msi_domain);
+		irq_domain_remove(middle_domain);
 		return -ENOMEM;
 	}
 

[toc] | [next] | [standalone]


#1355755 — [tip:irq/core] irqchip/irq-alpine-msi: Release the correct domain on error

Fromtip-bot for Dan Carpenter <tipbot@zytor.com>
Date2016-03-11 10:20 +0100
Subject[tip:irq/core] irqchip/irq-alpine-msi: Release the correct domain on error
Message-ID<rbroK-3VO-27@gated-at.bofh.it>
In reply to#1355683
Commit-ID:  143d36a33b4d59a56bb8e913a17a105578fd3237
Gitweb:     http://git.kernel.org/tip/143d36a33b4d59a56bb8e913a17a105578fd3237
Author:     Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate: Fri, 11 Mar 2016 11:14:43 +0300
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 11 Mar 2016 10:06:55 +0100

irqchip/irq-alpine-msi: Release the correct domain on error

The "msi_domain" variable is NULL here so it leads to a NULL dereference.  It
looks like we actually intended to free "middle_domain".

Fixes: e6b78f2c3e14 ('irqchip: Add the Alpine MSIX interrupt controller')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
Cc: kernel-janitors@vger.kernel.org
Cc: Tsahee Zidenberg <tsahee@annapurnalabs.com>
Link: http://lkml.kernel.org/r/20160311081442.GE31887@mwanda
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 drivers/irqchip/irq-alpine-msi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c
index f871272..2538425 100644
--- a/drivers/irqchip/irq-alpine-msi.c
+++ b/drivers/irqchip/irq-alpine-msi.c
@@ -220,7 +220,7 @@ static int alpine_msix_init_domains(struct alpine_msix_data *priv,
 					       middle_domain);
 	if (!msi_domain) {
 		pr_err("Failed to create MSI domain\n");
-		irq_domain_remove(msi_domain);
+		irq_domain_remove(middle_domain);
 		return -ENOMEM;
 	}
 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web