Skip to contentSkip to conversation

Race: host lock is not acquired before calling ql_icmd

Bug 7644 [email protected] 1 participant 1 message Apr 13, 2008 1 message not in the archive SCSI

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

http://bugzilla.kernel.org/show_bug.cgi?id=7644

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |[email protected]
             Status|NEW                         |REJECTED
         Resolution|                            |INVALID

------- Comment #1 from [email protected] 2008-04-12 19:55 ------- We do hold the lock in generic scsi code when call queuecommand. in scsi_dispatch_cmd:

...

        spin_lock_irqsave(host->host_lock, flags);
        scsi_cmd_get_serial(host, cmd);

        if (unlikely(host->shost_state == SHOST_DEL)) {
                cmd->result = (DID_NO_CONNECT << 16);
                scsi_done(cmd);
        } else {
                rtn = host->hostt->queuecommand(cmd, scsi_done);
        }
        spin_unlock_irqrestore(host->host_lock, flags);

...

scsi_send)eh_command:

...

        spin_lock_irqsave(shost->host_lock, flags);
        scsi_log_send(scmd);
        shost->hostt->queuecommand(scmd, scsi_eh_done);
        spin_unlock_irqrestore(shost->host_lock, flags);

...

So it looks like we are good.

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.