Christoph Hellwig 5e012aad85 [SCSI] don't reference freed command in scsi_init_sgtable
Patch

commit 0479633686d370303e3430256ace4bd5f7f138dc
Author: Christoph Hellwig <hch@infradead.org>
Date:   Thu Feb 20 14:20:55 2014 -0800

    [SCSI] do not manipulate device reference counts in scsi_get/put_command

Introduced a use after free: when scsi_init_io fails we have to release our
device reference, but we do this trying to reference the just freed command.
Add a local scsi_device pointer to fix this.

Fixes: 0479633686d370303e3430256ace4bd5f7f138dc
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2014-04-21 07:57:21 -07:00
..
2011-07-26 16:49:47 -07:00
2014-03-15 10:19:17 -07:00
2014-04-01 18:49:04 -07:00
2013-11-23 22:33:47 -08:00
2013-04-09 14:13:21 -04:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2013-04-09 14:13:23 -04:00
2013-02-27 19:10:18 -08:00
2011-03-31 11:26:23 -03:00
2013-10-25 11:36:26 +01:00
2013-04-09 14:13:17 -04:00
2013-04-09 14:13:16 -04:00
2013-04-09 14:13:16 -04:00
2013-04-09 14:13:16 -04:00
2013-04-09 14:13:16 -04:00
2011-03-31 11:26:23 -03:00
2013-04-09 14:13:27 -04:00
2014-04-10 15:30:35 -07:00
2013-04-09 14:13:17 -04:00
2012-03-28 18:30:03 +01:00
2013-04-09 14:13:15 -04:00
2013-04-09 14:13:17 -04:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:03 +01:00
2011-03-31 11:26:23 -03:00
2013-04-09 14:13:17 -04:00
2013-12-06 08:30:18 -08:00
2012-02-21 11:40:37 +01:00
2013-04-09 14:13:17 -04:00
2014-04-10 15:30:35 -07:00
2014-04-10 15:30:35 -07:00
2014-04-01 18:49:04 -07:00
2012-01-03 22:54:07 -05:00
2013-11-23 22:33:50 -08:00
2013-12-16 10:57:51 -08:00
2012-09-14 17:59:29 +01:00
2013-05-04 14:50:16 -04:00
2013-05-04 14:50:16 -04:00
2013-05-04 14:50:16 -04:00
2013-04-09 14:13:17 -04:00
2013-04-09 14:13:15 -04:00
2013-04-09 14:13:15 -04:00