Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a5c19c2 authored by James Bottomley's avatar James Bottomley
Browse files

[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: default avatarTejun Heo <tj@kernel.org>
Reported-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 7e443312
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);