linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	Andrew Morton <akpm@digeo.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"Martin J. Bligh" <Martin.Bligh@us.ibm.com>,
	Jens Axboe <axboe@suse.de>, Doug Ledford <dledford@redhat.com>
Subject: Re: possible use-after-free in 2.5.44 scsi changes
Date: Fri, 25 Oct 2002 19:13:25 -0500	[thread overview]
Message-ID: <200210260013.g9Q0DP105454@localhost.localdomain> (raw)
In-Reply-To: Message from Badari Pulavarty <pbadari@us.ibm.com> of "Fri, 25 Oct 2002 15:23:09 PDT." <200210252223.g9PMN9a17551@eng2.beaverton.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 645 bytes --]

pbadari@us.ibm.com said:
> I Just tried the patch. No Luck. I get same panic as before... I am
> using qla2x00src-v6.03.00b6 driver on qla2200 fc controllers. 

Well, yours may be a qla bug.

However, I've tracked down my hang problem:  If a command is pushed back into 
the block queue as a REQ_SPECIAL using the blk_insert_request() API, it never 
has REQ_CMD cleared.  Eventually it comes back into scsi_request_fn() with 
both REQ_CMD and REQ_SPECIAL set.  This causes the I/O to be initialised again.

The fix is to clear REQ_CMD in blk_insert_request().

This may also be the cause of Patrick's Incorrect number of segments error.

James


[-- Attachment #2: tmp.diff --]
[-- Type: text/plain , Size: 374 bytes --]

===== drivers/block/ll_rw_blk.c 1.123 vs edited =====
--- 1.123/drivers/block/ll_rw_blk.c	Fri Oct 18 12:41:37 2002
+++ edited/drivers/block/ll_rw_blk.c	Fri Oct 25 18:48:12 2002
@@ -1374,6 +1374,7 @@
 	 * must not attempt merges on this) and that it acts as a soft
 	 * barrier
 	 */
+	rq->flags &= ~REQ_CMD;
 	rq->flags |= REQ_SPECIAL | REQ_BARRIER;
 
 	rq->special = data;

  reply	other threads:[~2002-10-26  0:13 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-25  1:39 possible use-after-free in 2.5.44 scsi changes Andrew Morton
2002-10-25  4:06 ` Doug Ledford
2002-10-25  4:40   ` Andrew Morton
2002-10-25 14:21     ` James Bottomley
2002-10-25  4:07 ` Patrick Mansfield
2002-10-25 14:16 ` James Bottomley
2002-10-25 18:34   ` James Bottomley
2002-10-25 18:49     ` Mike Anderson
2002-10-25 19:08     ` Patrick Mansfield
2002-10-25 19:41       ` Mike Anderson
2002-10-25 19:47         ` Jens Axboe
2002-10-25 22:14           ` James Bottomley
2002-10-25 22:18             ` Andrew Morton
2002-10-25 22:23     ` Badari Pulavarty
2002-10-26  0:13       ` James Bottomley [this message]
2002-10-26  0:18         ` Mike Anderson
2002-10-26  9:29         ` Jens Axboe
2002-10-27  0:50           ` James Bottomley
2002-10-27 21:20             ` Jens Axboe
2002-10-27 21:37               ` James Bottomley
2002-10-27 21:54                 ` Jens Axboe
2002-10-30 17:39                   ` Badari Pulavarty
2002-10-30 18:16                     ` Jens Axboe
2002-10-30 19:31                       ` Badari Pulavarty
2002-10-30 21:36                         ` merlin hughes
2002-10-30 22:19                           ` Badari Pulavarty
2002-10-31  2:17                             ` merlin
2002-10-31 13:18                               ` Jens Axboe
2002-10-31 14:41                                 ` merlin
2002-10-31 14:46                                   ` Jens Axboe
2002-10-31 15:04                             ` Jens Axboe
2002-10-31 15:12                               ` Jens Axboe
2002-10-31 17:41                                 ` merlin
2002-10-30 20:35                       ` David S. Miller
2002-10-30 22:03                         ` Badari Pulavarty
  -- strict thread matches above, loose matches on Subject: below --
2002-10-31 17:57 Badari Pulavarty
2002-10-31 18:46 ` 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=200210260013.g9Q0DP105454@localhost.localdomain \
    --to=james.bottomley@steeleye.com \
    --cc=Martin.Bligh@us.ibm.com \
    --cc=akpm@digeo.com \
    --cc=axboe@suse.de \
    --cc=dledford@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=pbadari@us.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).