From: Olaf Hering <olh@suse.de>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: 2.6.16-rc1 crash in scsi_target_reap_work
Date: Thu, 9 Feb 2006 21:05:29 +0100 [thread overview]
Message-ID: <20060209200529.GA8968@suse.de> (raw)
In-Reply-To: <1139265890.3022.63.camel@mulgrave.il.steeleye.com>
On Mon, Feb 06, James Bottomley wrote:
> On Mon, 2006-02-06 at 23:04 +0100, Olaf Hering wrote:
> > I need help on this one.
> > What I have so far (via git-bisect) is:
>
> My guess would be this patch:
>
>
> commit
> 863a930a40eb7f2d18534c2c166b22582f5c6cfd
> [SCSI] fix scsi_reap_target() device_del from atomic context
I'm testing this patch now.
+++ linux-2.6.16-rc2-olh/drivers/scsi/scsi_scan.c
@@ -428,18 +428,19 @@ static void scsi_target_reap_work(void *
*/
void scsi_target_reap(struct scsi_target *starget)
{
- struct work_queue_wrapper *wqw =
- kzalloc(sizeof(struct work_queue_wrapper), GFP_ATOMIC);
+ struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
+ unsigned long flags;
+ spin_lock_irqsave(shost->host_lock, flags);
- if (!wqw) {
- starget_printk(KERN_ERR, starget,
- "Failed to allocate memory in scsi_reap_target()\n");
+ if (--starget->reap_ref == 0 && list_empty(&starget->devices)) {
+ list_del_init(&starget->siblings);
+ spin_unlock_irqrestore(shost->host_lock, flags);
+ device_del(&starget->dev);
+ transport_unregister_device(&starget->dev);
+ put_device(&starget->dev);
return;
}
-
- INIT_WORK(&wqw->work, scsi_target_reap_work, wqw);
- wqw->starget = starget;
- schedule_work(&wqw->work);
+ spin_unlock_irqrestore(shost->host_lock, flags);
}
/**
--
short story of a lazy sysadmin:
alias appserv=wotan
next prev parent reply other threads:[~2006-02-09 20:05 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 [this message]
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
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=20060209200529.GA8968@suse.de \
--to=olh@suse.de \
--cc=James.Bottomley@SteelEye.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;
as well as URLs for NNTP newsgroup(s).