From: 'Christoph Hellwig' <hch@infradead.org>
To: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
Cc: Mark Haverkamp <markh@osdl.org>, linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: dpt_i2o driver
Date: Tue, 2 Sep 2003 18:34:08 +0100 [thread overview]
Message-ID: <20030902183408.A14487@infradead.org> (raw)
In-Reply-To: <0998F43EAD645A47B3F6507196DD70EA256916@OTCEXC01>; from mark_salyzyn@adaptec.com on Tue, Sep 02, 2003 at 01:26:53PM -0400
On Tue, Sep 02, 2003 at 01:26:53PM -0400, Salyzyn, Mark wrote:
> dpt_i2o holds on to the device structures in the `hostdata' areas of the
> device in order to speed up TID (I2O Target Identifier) lookup. This code
> may be in jeopardy as a result:
>
> (struct adpt_device*)(cmd->device->hostdata) = pDev;
> . . .
> pDev->pScsi_dev = cmd->device;
That is bad indeed and I still need to audit all drivers for issues
like that. Either we kill this cache (I need to take a look at the
actual code). OR you need to grab a reference using scsi_device_get
when you store it and release it in your ->slave_destroy method that's
called when the device is marked deleted.
> The pScsi_dev references can disappear, a hotplug reaction to clear this
> needs to be registered to free up the double linked references made like
> above (this is a plea for help to understand hotplug ;-/ ). Once this double
> linked reference is cleared, the busy check report ENODEV which is an
> `adequate' response indicating no longer busy.
Why do you need an ioctl then? Just wait for the sysfs file to
disappear..
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Sep 02, 2003 at 01:26:53PM -0400, Salyzyn, Mark wrote:
> dpt_i2o holds on to the device structures in the `hostdata' areas of the
> device in order to speed up TID (I2O Target Identifier) lookup. This code
> may be in jeopardy as a result:
>
> (struct adpt_device*)(cmd->device->hostdata) = pDev;
> . . .
> pDev->pScsi_dev = cmd->device;
That is bad indeed and I still need to audit all drivers for issues
like that. Either we kill this cache (I need to take a look at the
actual code). OR you need to grab a reference using scsi_device_get
when you store it and release it in your ->slave_destroy method that's
called when the device is marked deleted.
> The pScsi_dev references can disappear, a hotplug reaction to clear this
> needs to be registered to free up the double linked references made like
> above (this is a plea for help to understand hotplug ;-/ ). Once this double
> linked reference is cleared, the busy check report ENODEV which is an
> `adequate' response indicating no longer busy.
Why do you need an ioctl then? Just wait for the sysfs file to
disappear..
next prev parent reply other threads:[~2003-09-02 17:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-02 17:26 dpt_i2o driver Salyzyn, Mark
2003-09-02 17:34 ` 'Christoph Hellwig' [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-09-02 17:39 Salyzyn, Mark
2003-09-02 17:10 Salyzyn, Mark
2003-09-02 17:14 ` 'Christoph Hellwig'
2003-09-02 16:41 Salyzyn, Mark
2003-09-02 17:00 ` 'Christoph Hellwig'
2003-09-02 13:51 Salyzyn, Mark
2003-09-02 14:00 ` 'Christoph Hellwig'
2003-08-26 17:17 Salyzyn, Mark
2003-08-28 10:11 ` 'Christoph Hellwig'
2003-08-26 15:02 Salyzyn, Mark
2003-08-26 16:51 ` 'Christoph Hellwig'
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=20030902183408.A14487@infradead.org \
--to=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mark_salyzyn@adaptec.com \
--cc=markh@osdl.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