]> git.proxmox.com Git - qemu.git/commit - hw/scsi/scsi-bus.c
scsi: Dequeue requests before invoking completion callback
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 13 Jul 2010 12:13:45 +0000 (14:13 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 22 Jul 2010 03:52:10 +0000 (05:52 +0200)
commite8637c9013609271772cc0c3436cb1240cd6b034
tree28f83503b6085bf81e99a7b31fe120cc192916ab
parent9651ac55e5de0e1534d898316cc851af6ffc4334
scsi: Dequeue requests before invoking completion callback

The request completion callback of the LSI controller may start the next
request that can use the same tag as the completed one. As the latter is
still enqueued at that point, scsi_send_command will complain about the
tag reuse and cancel the completed request. That will cause a double
free later on when the completion path cleans up as well.

Fix this by dequeuing the request before invoking the callback.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/scsi-bus.c
hw/scsi.h