From: Mike Christie <michaelc@cs.wisc.edu>
To: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: [PATCH] add missing free sgtable in scsi_init_io error path
Date: Wed, 03 Mar 2004 22:24:29 -0800 [thread overview]
Message-ID: <4046CB9D.1010602@cs.wisc.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 392 bytes --]
I was testing different errors while running multipath, and becuase of a
bug in dm-multiapth I hit the "Incorrect number of segments after
building list" error. The attached patch just adds a missing
scsi_release_buffers() at the bottom of the scsi_init_io where the table
was allocated successfully, but you can return BLKPREP_KILL when someone
messes up segment counts.
Mike Christie
[-- Attachment #2: sgfree.patch --]
[-- Type: text/plain, Size: 383 bytes --]
--- linux-2.6.4-rc1-orig/drivers/scsi/scsi_lib.c 2004-02-27 14:21:02.000000000 -0800
+++ linux-2.6.4-rc1-scsi/drivers/scsi/scsi_lib.c 2004-03-03 00:22:31.030243228 -0800
@@ -917,6 +917,7 @@ static int scsi_init_io(struct scsi_cmnd
req->current_nr_sectors);
/* release the command and kill it */
+ scsi_release_buffers(cmd);
scsi_put_command(cmd);
return BLKPREP_KILL;
}
reply other threads:[~2004-03-04 6:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4046CB9D.1010602@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--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