Commit:     ff83efacf2b77a1fe8942db6613825a4b80ee5e2
Parent:     279e7f5425c5e6da6ca61b1d8576356a939789f9
Author:     James Bottomley <[EMAIL PROTECTED]>
AuthorDate: Sun Feb 17 11:24:51 2008 -0600
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Mon Feb 18 09:02:25 2008 -0600

    [SCSI] gdth: don't call pci_free_consistent under spinlock
    The spinlock is held over too large a region: pscratch is a permanent
    address (it's allocated at boot time and never changes).  All you need
    the smp lock for is mediating the scratch in use flag, so fix this by
    moving the spinlock into the case where we set the pscratch_busy flag
    to false.
    Cc: Stable Tree <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
 drivers/scsi/gdth_proc.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/gdth_proc.c b/drivers/scsi/gdth_proc.c
index de57734..ce0228e 100644
--- a/drivers/scsi/gdth_proc.c
+++ b/drivers/scsi/gdth_proc.c
@@ -694,15 +694,13 @@ static void gdth_ioctl_free(gdth_ha_str *ha, int size, 
char *buf, ulong64 paddr)
     ulong flags;
-    spin_lock_irqsave(&ha->smp_lock, flags);
     if (buf == ha->pscratch) {
+       spin_lock_irqsave(&ha->smp_lock, flags);
         ha->scratch_busy = FALSE;
+       spin_unlock_irqrestore(&ha->smp_lock, flags);
     } else {
         pci_free_consistent(ha->pdev, size, buf, paddr);
-    spin_unlock_irqrestore(&ha->smp_lock, flags);
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

Reply via email to