From: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
To: linux-scsi@vger.kernel.org
Subject: [PATCH 1/1] aacraid: prevent panic on adapter resource failure
Date: Thu, 2 Aug 2007 15:38:59 -0400 [thread overview]
Message-ID: <AE4F746F2AECFC4DA4AADD66A1DFEF01CB79D7@otce2k301.adaptec.com> (raw)
In-Reply-To: <AE4F746F2AECFC4DA4AADD66A1DFEF01C5B438@otce2k301.adaptec.com>
[-- Attachment #1: Type: text/plain, Size: 652 bytes --]
If the driver fails to allocate the contiguous (DMAable) memory for
system reasons, we fail to load the instance, but then we try to free
the <nul> allocation in the cleanup code and we get a panic in
pci_free_consistent(). This is reported against an older kernel, hope
this is relevant for latest/greatest.
This attached patch is against current scsi-misc-2.6.
ObligatoryDisclaimer: Please accept my condolences regarding Outlook's
handling of patch attachments.
Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
drivers/scsi/aacraid/linit.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Sincerely -- Mark Salyzyn
[-- Attachment #2: aacraid_fail_to_load_panic.patch --]
[-- Type: application/octet-stream, Size: 561 bytes --]
diff -ru a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
--- a/drivers/scsi/aacraid/linit.c 2007-08-02 15:30:35.489215671 -0400
+++ b/drivers/scsi/aacraid/linit.c 2007-08-02 15:30:41.567415315 -0400
@@ -1110,7 +1110,9 @@
__aac_shutdown(aac);
out_unmap:
aac_fib_map_free(aac);
- pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys);
+ if (aac->comm_addr)
+ pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr,
+ aac->comm_phys);
kfree(aac->queues);
aac_adapter_ioremap(aac, 0);
kfree(aac->fibs);
next prev parent reply other threads:[~2007-08-02 19:39 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <86802c440705291859y39a4ca27uf5ddb84810f33510@mail.gmail.com>
2007-05-30 2:13 ` kexec and aacraid broken Andrew Morton
2007-05-30 11:44 ` Salyzyn, Mark
2007-05-30 13:24 ` Vivek Goyal
2007-05-30 13:57 ` Salyzyn, Mark
2007-05-30 14:17 ` Vivek Goyal
2007-05-30 14:30 ` Salyzyn, Mark
2007-05-30 15:59 ` [PATCH] aacraid: fix shutdown handler to also disable interrupts Salyzyn, Mark
2007-05-30 17:36 ` Yinghai Lu
2007-06-01 11:08 ` Vivek Goyal
2007-06-01 17:07 ` Yinghai Lu
2007-06-01 17:34 ` Salyzyn, Mark
2007-06-07 17:21 ` [PATCH] aacraid: add SCSI SYNCHONIZE_CACHE range checking Salyzyn, Mark
2007-06-11 20:17 ` [PATCH] aacraid: probe related code cleanup Salyzyn, Mark
2007-06-20 15:30 ` [PATCH] aacraid: add SCSI SYNCHONIZE_CACHE range checking (take 2) Salyzyn, Mark
2007-07-09 13:57 ` [PATCH] aacraid: add 51245, 51645 and 52245 adapters to documentation Salyzyn, Mark
2007-07-23 14:13 ` [PATCH] aacraid: sysfs adapter reset/status format change Salyzyn, Mark
2007-07-26 18:20 ` [PATCH 1/1] aacraid: draw line in sand, sundry cleanup and version update Salyzyn, Mark
2007-07-27 14:29 ` [PATCH 1/1] aacraid: fix Sunrise Lake reset handling Salyzyn, Mark
2007-08-02 19:38 ` Salyzyn, Mark [this message]
2007-08-07 19:36 ` [PATCH 1/1] aacraid: default timeout for arrays too short Salyzyn, Mark
2007-09-04 16:55 ` [PATCH 1/1] aacraid: Add documentation for new Adaptec, SMC and SUN cards Salyzyn, Mark
2007-05-30 21:19 ` kexec and aacraid broken Yinghai Lu
2007-05-30 21:22 ` Yinghai Lu
2007-05-30 21:49 ` Salyzyn, Mark
2007-05-30 22:11 ` Yinghai Lu
2007-05-31 12:37 ` Salyzyn, Mark
2007-05-31 19:59 ` Yinghai Lu
2007-05-31 20:45 ` Salyzyn, Mark
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=AE4F746F2AECFC4DA4AADD66A1DFEF01CB79D7@otce2k301.adaptec.com \
--to=mark_salyzyn@adaptec.com \
--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