提交 89a342ca 编写于 作者: M Mike Maslenkin 提交者: James Bottomley

[SCSI] scsi_transport_spi: fix for unbalanced reference counting

Check the domain validation flag on the given device before referencing
scsi_device instance, otherwise if the flag is already set we return without
decrementing the reference count.
Signed-off-by: NMike Maslenkin <mihailm@parallels.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 9ebd99c5
...@@ -1010,10 +1010,10 @@ spi_dv_device(struct scsi_device *sdev) ...@@ -1010,10 +1010,10 @@ spi_dv_device(struct scsi_device *sdev)
u8 *buffer; u8 *buffer;
const int len = SPI_MAX_ECHO_BUFFER_SIZE*2; const int len = SPI_MAX_ECHO_BUFFER_SIZE*2;
if (unlikely(scsi_device_get(sdev))) if (unlikely(spi_dv_in_progress(starget)))
return; return;
if (unlikely(spi_dv_in_progress(starget))) if (unlikely(scsi_device_get(sdev)))
return; return;
spi_dv_in_progress(starget) = 1; spi_dv_in_progress(starget) = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册