From: Matthew Wilcox <matthew@wil.cx>
To: Andrew Morton <akpm@osdl.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>,
linux-scsi@vger.kernel.org
Subject: Re: [SCSI] fix scsi_reap_target() device_del from atomic context
Date: Fri, 23 Dec 2005 05:15:34 -0700 [thread overview]
Message-ID: <20051223121534.GM2361@parisc-linux.org> (raw)
In-Reply-To: <20051222221329.5f317b8d.akpm@osdl.org>
On Thu, Dec 22, 2005 at 10:13:29PM -0800, Andrew Morton wrote:
> > + struct work_queue_wrapper *wqw = (struct work_queue_wrapper *)data;
> > + struct scsi_target *starget = wqw->starget;
> > + struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
> > + unsigned long flags;
> > +
> > + kfree(wqw);
> > +
> > + spin_lock_irqsave(shost->host_lock, flags);
> > +
> > + 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;
> > +
> > + }
> > + spin_unlock_irqrestore(shost->host_lock, flags);
> > +
> > + return;
> > +}
>
> Given that this can run an arbitrary amount of time later on, how do we
> know that *shost is still live?
If there's still an starget, its parent shost must still be around, no?
next prev parent reply other threads:[~2005-12-23 12:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200512212359.jBLNxluV016971@hera.kernel.org>
2005-12-23 6:13 ` [SCSI] fix scsi_reap_target() device_del from atomic context Andrew Morton
2005-12-23 12:15 ` Matthew Wilcox [this message]
2005-12-23 15:27 ` James Bottomley
2005-12-23 15:38 ` Andrew Morton
2005-12-23 15:58 ` James Bottomley
2005-12-24 3:54 ` Andrew Morton
2005-12-23 20:05 ` Andrew Vasquez
2005-12-23 20:30 ` James Bottomley
2005-12-23 20:46 ` Andrew Vasquez
2005-12-23 20:43 ` Sergey Vlasov
2005-12-23 20:53 ` James Bottomley
2005-12-23 21:26 ` Sergey Vlasov
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=20051223121534.GM2361@parisc-linux.org \
--to=matthew@wil.cx \
--cc=James.Bottomley@steeleye.com \
--cc=akpm@osdl.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