diff options
author | James Bottomley <James.Bottomley@suse.de> | 2010-08-16 10:06:26 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-09-09 09:58:18 -0500 |
commit | 3a5c19c23db65a554f2e4f5df5f307c668277056 (patch) | |
tree | eb89ea587d49af31eb21ba2c08824c0b9cf056b0 | |
parent | 7e443312403ad1ff40ef3177590e96d1fe747c79 (diff) | |
download | talos-obmc-linux-3a5c19c23db65a554f2e4f5df5f307c668277056.tar.gz talos-obmc-linux-3a5c19c23db65a554f2e4f5df5f307c668277056.zip |
[SCSI] fix use-after-free in scsi_init_io()
we're using a pointer through a freed command to reset the request,
which has shown up as an oops with slab poisoning:
Reported-by: Tejun Heo <tj@kernel.org>
Reported-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r-- | drivers/scsi/scsi_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 9ade720422c6..ee02d3838a0a 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1011,8 +1011,8 @@ int scsi_init_io(struct scsi_cmnd *cmd, gfp_t gfp_mask) err_exit: scsi_release_buffers(cmd); - scsi_put_command(cmd); cmd->request->special = NULL; + scsi_put_command(cmd); return error; } EXPORT_SYMBOL(scsi_init_io); |