Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b7bb125dc3d0ca3f72c9116525ce0f018a9844e1
Commit:     b7bb125dc3d0ca3f72c9116525ce0f018a9844e1
Parent:     49f019d66d056ebb261d261d7c89cb698f5eec18
Author:     Greg Kroah-Hartman <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 9 11:52:31 2007 -0400
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 10:57:30 2007 -0700

    SCSI: use the proper semaphore to protect the class lists
    
    SCSI was using the incorrect lock to protect walking the list of all
    devices in the class.  This patch fixes this.
    
    Cc: James Bottomley <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/scsi/hosts.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 38c3a29..bd8e7f3 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -435,7 +435,7 @@ struct Scsi_Host *scsi_host_lookup(unsigned short hostnum)
        struct class_device *cdev;
        struct Scsi_Host *shost = ERR_PTR(-ENXIO), *p;
 
-       down_read(&class->subsys.rwsem);
+       down(&class->sem);
        list_for_each_entry(cdev, &class->children, node) {
                p = class_to_shost(cdev);
                if (p->host_no == hostnum) {
@@ -443,7 +443,7 @@ struct Scsi_Host *scsi_host_lookup(unsigned short hostnum)
                        break;
                }
        }
-       up_read(&class->subsys.rwsem);
+       up(&class->sem);
 
        return shost;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to