Commit 8ea6bc67 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley

[PATCH] add missing free sgtable in scsi_init_io error path

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.
parent 9897d23f
......@@ -917,6 +917,7 @@ static int scsi_init_io(struct scsi_cmnd *cmd)
req->current_nr_sectors);
/* release the command and kill it */
scsi_release_buffers(cmd);
scsi_put_command(cmd);
return BLKPREP_KILL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment