From: Zach Brown <zach.brown@oracle.com>
To: linux-driver@qlogic.com, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: [PATCH] [qla2xxx] only free_irq() after request_irq() succeeds
Date: Mon, 10 Apr 2006 16:39:36 -0700 (PDT) [thread overview]
Message-ID: <20060410233936.28628.13303.sendpatchset@tetsuo.zabbo.net> (raw)
[qla2xxx] only free_irq() after request_irq() succeeds
If qla2x00_probe_one() fails before calling request_irq() but gets to
qla2x00_free_device() then it will mistakenly tree to free an irq it didn't
request. It's chosing to free based on ha->pdev->irq which is always set.
host->irq is set after request_irq() succeeds so let's use that to decide
to free or not.
This was observed and tested when a silly set of circumstances lead to firmware
loading failing on a 2100.
Signed-off-by: Zach Brown <zach.brown@oracle.com>
---
drivers/scsi/qla2xxx/qla_os.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: 2.6.17-rc1-mm2-qlafreeirq/drivers/scsi/qla2xxx/qla_os.c
===================================================================
--- 2.6.17-rc1-mm2-qlafreeirq.orig/drivers/scsi/qla2xxx/qla_os.c
+++ 2.6.17-rc1-mm2-qlafreeirq/drivers/scsi/qla2xxx/qla_os.c
@@ -1700,8 +1700,8 @@ qla2x00_free_device(scsi_qla_host_t *ha)
ha->flags.online = 0;
/* Detach interrupts */
- if (ha->pdev->irq)
- free_irq(ha->pdev->irq, ha);
+ if (ha->host->irq)
+ free_irq(ha->host->irq, ha);
/* release io space registers */
if (ha->iobase)
reply other threads:[~2006-04-10 23:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20060410233936.28628.13303.sendpatchset@tetsuo.zabbo.net \
--to=zach.brown@oracle.com \
--cc=linux-driver@qlogic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/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
Powered by JetHome