Hold host_set lock while finishing internal qc. Signed-off-by: Tejun Heo <htejun@xxxxxxxxx> --- drivers/scsi/libata-core.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) ba608e38dd436e9129b6a9c99b9fa1f77a79a024 diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 8bf8cc6..d2a7b6f 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -1031,6 +1031,8 @@ unsigned ata_exec_internal(struct ata_po spin_unlock_irqrestore(&ap->host_set->lock, flags); } + spin_lock_irqsave(&ap->host_set->lock, flags); + *tf = qc->tf; err_mask = qc->err_mask; @@ -1052,6 +1054,8 @@ unsigned ata_exec_internal(struct ata_po ata_port_probe(ap); } + spin_unlock_irqrestore(&ap->host_set->lock, flags); + return err_mask; } -- 1.2.4 - : send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html