From: Arjan van de Ven <arjanv@redhat.com>
To: "Justin T. Gibbs" <Justin_Gibbs@adaptec.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] 2.4.X Avoid excessive recursion when setting device offline
Date: Mon, 29 Mar 2004 19:26:48 +0200 [thread overview]
Message-ID: <1080581208.3570.10.camel@laptop.fenrus.com> (raw)
In-Reply-To: <387680000.1080580020@aslan.btc.adaptec.com>
[-- Attachment #1.1: Type: text/plain, Size: 1117 bytes --]
On Mon, 2004-03-29 at 19:07, Justin T. Gibbs wrote:
> How to reproduce: Queue up lots of I/O to a device. Set that device
> offline.
>
> Result: The SCSI mid-layer blows out the kernel stack due to the inherent
> recursion in its request function. The repeating stack trace goes
> something like:
>
> scsi_request_fn
> __scsi_end_request
> scsi_release_command
> scsi_queue_next_request
> scsi_request_fn
> ...
>
> This patch prevents recursive calls through the scsi_request_fn
> for the same queue:
won't this achieve the same ?
diff -urN Linux/drivers/scsi/scsi_lib.c linux/drivers/scsi/scsi_lib.c
--- Linux/drivers/scsi/scsi_lib.c 2002-10-03 16:50:07.000000000
+0200
+++ linux/drivers/scsi/scsi_lib.c 2002-10-03 17:33:20.000000000
+0200
@@ -442,7 +442,7 @@
* This will goose the queue request function at the end, so we
don't
* need to worry about launching another command.
*/
- scsi_release_command(SCpnt);
+ __scsi_release_command(SCpnt);
if( frequeue ) {
request_queue_t *q;
[-- Attachment #1.2: scsi.patch --]
[-- Type: text/x-patch, Size: 480 bytes --]
diff -urN Linux/drivers/scsi/scsi_lib.c linux/drivers/scsi/scsi_lib.c
--- Linux/drivers/scsi/scsi_lib.c 2002-10-03 16:50:07.000000000 +0200
+++ linux/drivers/scsi/scsi_lib.c 2002-10-03 17:33:20.000000000 +0200
@@ -442,7 +442,7 @@
* This will goose the queue request function at the end, so we don't
* need to worry about launching another command.
*/
- scsi_release_command(SCpnt);
+ __scsi_release_command(SCpnt);
if( frequeue ) {
request_queue_t *q;
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-03-29 17:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-29 17:07 [PATCH] 2.4.X Avoid excessive recursion when setting device offline Justin T. Gibbs
2004-03-29 17:26 ` Arjan van de Ven [this message]
2004-03-29 17:42 ` Justin T. Gibbs
2004-03-29 17:47 ` James Bottomley
2004-03-29 17:52 ` Justin T. Gibbs
2004-03-30 7:03 ` Jens Axboe
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=1080581208.3570.10.camel@laptop.fenrus.com \
--to=arjanv@redhat.com \
--cc=Justin_Gibbs@adaptec.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox