From: James Bottomley <James.Bottomley@SteelEye.com>
To: Sergey Vlasov <vsu@altlinux.ru>
Cc: Andrew Morton <akpm@osdl.org>, linux-scsi@vger.kernel.org
Subject: Re: [SCSI] fix scsi_reap_target() device_del from atomic context
Date: Fri, 23 Dec 2005 14:53:39 -0600 [thread overview]
Message-ID: <1135371219.3728.50.camel@mulgrave> (raw)
In-Reply-To: <20051223234338.798294f9.vsu@altlinux.ru>
On Fri, 2005-12-23 at 23:43 +0300, Sergey Vlasov wrote:
> So if that GFP_ATOMIC allocation ever fails, the target is leaked
> forever - does not look nice.
Yes, but it will print a warning.
> Does anything depend on starget->siblings being empty after we had
> removed it from the shost->__targets list it was on? Seems that all
> other uses of this field are:
>
> drivers/scsi/scsi_scan.c:313: list_for_each_entry(starget, &shost->__targets, siblings) {
> drivers/scsi/scsi_scan.c:365: INIT_LIST_HEAD(&starget->siblings);
> drivers/scsi/scsi_scan.c:373: list_add_tail(&starget->siblings, &shost->__targets);
>
> So probably we can reuse this field and do deferred reaping without any
> memory allocation at all. The following patch should be applied
> _instead_ of the James' patch, not on top of it (I can make a combined
> patch if it is desired). The difference with the previous patch is that
> scsi_target_reap() still removes the target from shost->__targets
> immediately - only device_del() and subsequent actions are deferred to a
> workqueue.
No, you can't.
If you do this, the target namespace will potentially be in use in sysfs
after the system thinks the target is gone. Thus, any reallocation
fails because you can't add a new target with the same name as an
existing one.
James
next prev parent reply other threads:[~2005-12-23 20:53 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
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 [this message]
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=1135371219.3728.50.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=akpm@osdl.org \
--cc=linux-scsi@vger.kernel.org \
--cc=vsu@altlinux.ru \
/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