* [PATCH] add missing free sgtable in scsi_init_io error path
@ 2004-03-04 6:24 Mike Christie
0 siblings, 0 replies; only message in thread
From: Mike Christie @ 2004-03-04 6:24 UTC (permalink / raw)
To: SCSI Mailing List
[-- 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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-03-04 6:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-04 6:24 [PATCH] add missing free sgtable in scsi_init_io error path Mike Christie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox