From: "Justin T. Gibbs" <gibbs@scsiguy.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix scsi_unblock_requests()
Date: Tue, 10 Apr 2001 11:10:16 -0600 [thread overview]
Message-ID: <200104101710.f3AHAHs34083@aslan.scsiguy.com> (raw)
In-Reply-To: Your message of "Tue, 10 Apr 2001 17:06:26 BST." <E14n0ey-0004W9-00@the-village.bc.nu>
>> In its current implementation, scsi_unblock_requests() simply
>> clears host_self_blocked in the SCSI host struct. This means
>> that either a transaction must complete or a new transaction
>
>Suppose the queue is unblocked from inside the functions called to process
>the request. In that situation the old code is correct and your code might
>introduce other problems
Re-entrancy is only prevented by holding the io-request lock or in
some cases a per-controller or per-controller driver lock.
As the comment in scsi_unblock_requests() states, this API assumes
that no locks are held. If you hold a lock in calling this routine,
you may deadlock.
>> unblocks. scsi_queue_next_request() verifies all other state
>> to ensure queuing new transactions is safe prior to proceeding.
>
>Including recursion ?
I suppose a poorly implemented use of this API could tail recurse.
The aic7xxx driver calls this routine from a timeout handler so
there is no risk of stack explosion.
>The patch seems right apart from checking these details out further.
Well, the patch was written to have minimal impact to an API that
has never been used. A more correct solution might be to queue the
affected host controller to a queue drained by a bottom-half handler.
--
Justin
prev parent reply other threads:[~2001-04-10 17:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-10 15:02 Justin T. Gibbs
2001-04-10 16:06 ` Alan Cox
2001-04-10 17:10 ` Justin T. Gibbs [this message]
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=200104101710.f3AHAHs34083@aslan.scsiguy.com \
--to=gibbs@scsiguy.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®