From: Brian King <brking@us.ibm.com>
To: Olaf Hering <olh@suse.de>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
linux-scsi@vger.kernel.org
Subject: Re: 2.6.16-rc1 crash in scsi_target_reap_work
Date: Mon, 20 Feb 2006 17:00:09 -0600 [thread overview]
Message-ID: <43FA49F9.4020309@us.ibm.com> (raw)
In-Reply-To: <20060210232935.GA27760@suse.de>
[-- Attachment #1: Type: text/plain, Size: 2493 bytes --]
Olaf Hering wrote:
> 1:mon> d c0000000024cacc8
> c0000000024cacc8 00000000dead4ead ffffffff00000000 |......N.........|
> c0000000024cacd8 ffffffffffffffff c0000000024cace0 |.............L..|
> c0000000024cace8 c0000000024cace0 c000000000614f68 |.....L.......aOh|
> c0000000024cacf8 c000000000614f38 0000000000000000 |.....aO8........|
> c0000000024cad08 0000000000000000 0000000000000000 |................|
> c0000000024cad18 0000000000000000 0000000000000000 |................|
> c0000000024cad28 0000000000000000 0000000000000000 |................|
> c0000000024cad38 0000000000000000 0000000000000000 |................|
> c0000000024cad48 0000000000000000 0000000000000000 |................|
> c0000000024cad58 0000000000000000 0000000000000000 |................|
> c0000000024cad68 0000000000000000 0000000000000000 |................|
> c0000000024cad78 0000000000000000 0000000000000000 |................|
> c0000000024cad88 0000000000000000 0000000000000000 |................|
> c0000000024cad98 0000000000000000 0000000000000000 |................|
> c0000000024cada8 0000000000000000 0000000000000000 |................|
> c0000000024cadb8 0000000000000000 0000000000000000 |................|
> c0000000024cadc8 0000000000000000 0000000000000000 |................|
> c0000000024cadd8 0000000000000000 0000000000000000 |................|
I've now seen a couple recreates of this problem on various systems in
our labs, and there are always a bunch of zeroes in the struct device
in the same place as above. I wonder if perhaps the call to device_add
is failing in scsi_alloc_target. Failure of this call is not being handled
today. Can you give the attached patch a try?
> c0000000024cade8 0000000000000000 c00000000303a1a8 |................|
> c0000000024cadf8 c0000000024cae00 746172676574303a |.....L..target0:|
> c0000000024cae08 3235353a31303000 0000000000000006 |255:100.........|
> c0000000024cae18 c0000000024cae18 c0000000024cae18 |.....L.......L..|
> c0000000024cae28 c00000000303a2d8 c000000000500c88 |.............P..|
> c0000000024cae38 0000000000000000 0000000000000000 |................|
> c0000000024cae48 746172676574303a 3235353a31303000 |target0:255:100.|
> c0000000024cae58 0000000000000000 0000000000000000 |................|
> c0000000024cae68 0000000000000000 0000000000000000 |................|
> c0000000024cae78 0000000000000000 0000000000000000 |................|
--
Brian King
eServer Storage I/O
IBM Linux Technology Center
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: scsi_alloc_target_device_add_failure.patch --]
[-- Type: text/x-patch; name="scsi_alloc_target_device_add_failure.patch", Size: 1229 bytes --]
Signed-off-by: Brian King <brking@us.ibm.com>
---
linux-2.6-bjking1/drivers/scsi/scsi_scan.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff -puN drivers/scsi/scsi_scan.c~scsi_alloc_target_device_add_failure drivers/scsi/scsi_scan.c
--- linux-2.6/drivers/scsi/scsi_scan.c~scsi_alloc_target_device_add_failure 2006-02-20 14:55:13.000000000 -0600
+++ linux-2.6-bjking1/drivers/scsi/scsi_scan.c 2006-02-20 16:51:15.000000000 -0600
@@ -361,7 +361,15 @@ static struct scsi_target *scsi_alloc_ta
spin_unlock_irqrestore(shost->host_lock, flags);
/* allocate and add */
transport_setup_device(dev);
- device_add(dev);
+ if (device_add(dev)) {
+ spin_lock_irqsave(shost->host_lock, flags);
+ list_del_init(&starget->siblings);
+ spin_unlock_irqrestore(shost->host_lock, flags);
+ transport_destroy_device(dev);
+ put_device(parent);
+ kfree(starget);
+ return NULL;
+ }
transport_add_device(dev);
if (shost->hostt->target_alloc) {
int error = shost->hostt->target_alloc(starget);
@@ -403,7 +411,6 @@ static void scsi_target_reap_usercontext
transport_destroy_device(&starget->dev);
put_device(&starget->dev);
return;
-
}
spin_unlock_irqrestore(shost->host_lock, flags);
_
next prev parent reply other threads:[~2006-02-20 23:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-17 0:05 2.6.15-git12, slab corruption in ipr Olaf Hering
2006-01-18 18:42 ` Brian King
2006-01-19 21:05 ` Olaf Hering
2006-01-30 10:46 ` Olaf Hering
2006-01-30 16:49 ` Olaf Hering
2006-02-06 22:04 ` 2.6.16-rc1 crash in scsi_target_reap_work Olaf Hering
2006-02-06 22:26 ` Olaf Hering
2006-02-06 22:44 ` James Bottomley
2006-02-09 20:05 ` Olaf Hering
2006-02-10 10:11 ` Olaf Hering
2006-02-10 14:04 ` James Bottomley
2006-02-10 14:10 ` Olaf Hering
2006-02-10 23:01 ` Olaf Hering
2006-02-10 23:21 ` Brian King
2006-02-10 23:29 ` Olaf Hering
2006-02-11 10:34 ` Olaf Hering
2006-02-20 23:00 ` Brian King [this message]
2006-02-22 8:36 ` Olaf Hering
2006-02-22 14:38 ` Brian King
2006-02-22 15:53 ` Olaf Hering
2006-02-22 16:47 ` Mike Anderson
2006-02-22 17:05 ` James Bottomley
2006-02-10 21:28 ` Brian King
2006-01-30 18:07 ` 2.6.15-git12, slab corruption in ipr Olaf Hering
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=43FA49F9.4020309@us.ibm.com \
--to=brking@us.ibm.com \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=olh@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).