From: tip-bot for Dan Carpenter <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: jason@lakedaemon.net, hpa@zytor.com,
linux-kernel@vger.kernel.org, tsahee@annapurnalabs.com,
mingo@kernel.org, dan.carpenter@oracle.com, marc.zyngier@arm.com,
tglx@linutronix.de, antoine.tenart@free-electrons.com
Subject: [tip:irq/core] irqchip/irq-alpine-msi: Release the correct domain on error
Date: Fri, 11 Mar 2016 01:12:36 -0800 [thread overview]
Message-ID: <tip-143d36a33b4d59a56bb8e913a17a105578fd3237@git.kernel.org> (raw)
In-Reply-To: <20160311081442.GE31887@mwanda>
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;
}
prev parent reply other threads:[~2016-03-11 9:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-11 8:14 [patch] irqchip: irq-alpine-msi: releasing the wrong variable " Dan Carpenter
2016-03-11 9:12 ` tip-bot for Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-143d36a33b4d59a56bb8e913a17a105578fd3237@git.kernel.org \
--to=tipbot@zytor.com \
--cc=antoine.tenart@free-electrons.com \
--cc=dan.carpenter@oracle.com \
--cc=hpa@zytor.com \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=tsahee@annapurnalabs.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®