From: Jens Axboe <axboe@suse.de>
To: Tejun Heo <htejun@gmail.com>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] scsi_allocate_request() reference
Date: Tue, 22 Mar 2005 12:17:22 +0100 [thread overview]
Message-ID: <20050322111721.GV19037@suse.de> (raw)
In-Reply-To: <20050321235146.GA7994@htj.dyndns.org>
On Tue, Mar 22 2005, Tejun Heo wrote:
> Hello, Jens.
> Hello, James.
>
> On Mon, Mar 21, 2005 at 05:57:52PM +0100, Jens Axboe wrote:
> > On Mon, Mar 21 2005, James Bottomley wrote:
> > > On Mon, 2005-03-21 at 14:26 +0100, Jens Axboe wrote:
> > > > scsi_allocate_request() doesn't hold a reference to the device that it
> > > > points to, that is not good. This patch fixes that up.
> > >
> > > Actually, I don't think this is correct. The reference is taken when
> > > the command is attached to a request in the scsi_request_fn function
> > > after first checking that the entity is in a condition to have this
> > > happen.
> >
> > Where does this happen, specifically? I can verify that this patch
> > solves at least one of the oopses I am seeing with hotplug. IMHO, the
> > reference should be taken when you reference the device (ie ->sr_device
> > is assigned in scsi_allocate_request()).
>
> I've been working on scsi hot plug/unplugging for a few days now but
> I haven't seen any oops caused by reference count problems. The only
You need to have io in progress. The one ref problem with
scsi_allocate_request() is easy to trigger, if you just open/close the
device repeatedly while inserting and removing it.
> So, please let me know about the reference counting problem you're
> encountering. I will incorporate it in the new state machine /
> flushing patches.
See my two recent postings on this list!
--
Jens Axboe
next prev parent reply other threads:[~2005-03-22 11:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-21 13:26 [PATCH] scsi_allocate_request() reference Jens Axboe
2005-03-21 15:09 ` James Bottomley
2005-03-21 16:57 ` Jens Axboe
2005-03-21 23:51 ` Tejun Heo
2005-03-22 11:17 ` Jens Axboe [this message]
2005-03-22 15:34 ` James Bottomley
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=20050322111721.GV19037@suse.de \
--to=axboe@suse.de \
--cc=James.Bottomley@SteelEye.com \
--cc=htejun@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.