All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: Matthew Wilcox <willy@debian.org>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] Convert sym2 to be hotplug-capable
Date: Wed, 13 Aug 2003 15:13:52 +1000	[thread overview]
Message-ID: <20030813051352.GB30156@krispykreme> (raw)
In-Reply-To: <20030812234133.GA30156@krispykreme>

 
> One problem we found when we hit a bad adapter, we need to use scsi_host_put.

One more fix :)

In sym_attach we call sym_hcb_attach. If it fails we call
sym_free_resources which will call sym_hcb_free. Unfortunately
sym_hcb_attach also calls sym_hcb_free on failure.

This results in a bunch of things being freed twice and it looks like
the sym2 memory allocator adds them to the freelist twice. Sometime later
on we allocate the memory twice, with weird consequences.

Anton

diff -ru /tmp/sym53c8xx_2/sym_hipd.c gr13_work_miltonm_l4/drivers/scsi/sym53c8xx_2/sym_hipd.c
--- /tmp/sym53c8xx_2/sym_hipd.c	2003-07-03 13:57:21.000000000 -0500
+++ gr13_work_miltonm_l4/drivers/scsi/sym53c8xx_2/sym_hipd.c	2003-08-12 23:48:37.000000000 -0500
@@ -5942,14 +5943,7 @@
 	 */
 	return 0;
 
-	/*
-	 *  We have failed.
-	 *  We will try to free all the resources we have 
-	 *  allocated, but if we are a boot device, this 
-	 *  will not help that much.;)
-	 */
 attach_failed:
-		sym_hcb_free(np);
 	return -ENXIO;
 }
 

      reply	other threads:[~2003-08-13  5:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-16 21:00 [PATCH] Convert sym2 to be hotplug-capable Matthew Wilcox
2003-07-19 18:28 ` Anton Blanchard
2003-07-20 21:55   ` Matthew Wilcox
2003-08-12 23:41 ` Anton Blanchard
2003-08-13  5:13   ` Anton Blanchard [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=20030813051352.GB30156@krispykreme \
    --to=anton@samba.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=willy@debian.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.